Lucene.NET and searching on multiple fields with specific values...
Posted
by Kieron
on Stack Overflow
See other posts from Stack Overflow
or by Kieron
Published on 2010-03-29T16:28:42Z
Indexed on
2010/04/01
13:43 UTC
Read the original article
Hit count: 448
lucene.net
|c#
Hi,
I've created an index with various bits of data for each document I've added, each document can differ in it field name.
Later on, when I come to search the index I need to query it with exact field/ values - for example:
FieldName1 = X AND FieldName2 = Y AND FieldName3 = Z
What's the best way of constructing the following using Lucene .NET:
- What analyser is best to use for this exact match type?
- Upon retrieving a match, I only need one specific field to be returned (which I add to each document) - should this be the only one stored?
- Later on I'll need to support keyword searching (so a field can have a list of values and I'll need to do a partial match).
The fields and values come from a Dictionary<string, string>
. It's not user input, it's constructed from code.
Thanks,
Kieron
© Stack Overflow or respective owner