1

My data consists of virtually flat JSON objects. Most of the fields have single values, but some have an array of single values. It never goes deeper than that. I have about 100 top level fields, and I would like to be able to search on any combination of them. The user will create some ad hoc combination of search parameters at runtime. These can be a bit complex, such as

A && (B || C) && ~D

So handle parenthesis, ands, and ors, and A, B, C, and D can be equals, contains, nots, and numeric comparisons. I don't think I can achieve dynamic searching like this with Linq. It appears that Lucene can accept searches like this, but Lucene can only search on an index. Since I have about 100 fields, what's the recommended way to create indices? Should I create one index with 100 fields? Or 100 individual indices? Both of those sound very expensive and inefficient to me. Is there a better way?

Thank you.

Nikhil
  • 1,121
  • 2
  • 11
  • 27

1 Answers1

0

Let RavenDB handles that, it will create and maintain the appropriate indexes for you

Ayende Rahien
  • 22,925
  • 1
  • 36
  • 41
  • So if I make the lucene queries, will it automatically created indexes for me? Would these be one time indexes? Or would they persist and update with new data? When I tried queries via the web UI, it gave me an error unless the indexes already existed. Is there a flag I need to set somewhere? – Nikhil Apr 04 '14 at 14:34