0

So I have a field in my Lucene index documents named "Field1" (for all intents and purposes).

When I open Luke, and browse the documents, I see most of the documents have this field. However when I switch to the search tab, and I input Field1:parameterValue I get zero search results.

When doing the indexing, for the document, I have

doc.Add(new Field("Field1", field1, Field.Store.YES, Field.Index.ANALYZED));

Why is my field not able to be searched? As an aside, I can't find any documentation on Luke that explains what the "IdfpTSVopNLB#" column is in the document record either. I'm thinking this information could possibly be useful, so for one of the records that has this field, the column value is IdfpTS---N--- and the "Norm" column is 4.0

Bardicer
  • 1,405
  • 4
  • 26
  • 43

2 Answers2

2

The "IdfpTSVopNLB#" field is a collection of flags. You should see a key to it in Luke:

Luke flags key location

I would guess the reason your searches are failing is because you aren't taking your analysis into account. For instance, for your sample query: Field1:parameterValue, if the field is analyzed by StandardAnalyzer (and the query is not analyzer or is keyword analyzed), you'll get no results. This is because "parameterValue" would have been lowercased by the analyzer, so the actual searchable term would be "parametervalue", instead.

In the search tab, you should see a place to select an analyzer for Luke to use for query parsing. If you use the same analyzer you used to index the data, you may see better results.

femtoRgon
  • 32,893
  • 7
  • 60
  • 87
  • Sweet baby Jesus, how did I miss that? Thank you! – Bardicer Sep 22 '16 at 14:27
  • Still not clear what indexing options may result in empty flags ( or dashes ) for dfp. Older version of Luke had just I ( screenshot in the answer). Newer has 4 flags Idfp ( in the original question ) explained as I - Indexed ( docs,freqs,pos ) . Browsing existing indexes I can see only Idfp for each field. – MicMit Nov 21 '16 at 02:47
  • @MicMit - Just what it says, "I" if it indexed, and if so, what is indexed, documents, frequencies, or positions. If a field is indexed with docs and freqs, you would see "Idf-". It is most typical (ie. default behavior) to index all three: docs, freqs and positions. – femtoRgon Nov 21 '16 at 03:38
  • I was dealing only with Lucene.Net not greater than 3.0.3, looks like Enum FieldInfo.IndexOptions appeared later. – MicMit Nov 21 '16 at 21:57
0

As it turns out, this is the correct way to do this. I just needed to delete the entire index and rebuild it from scratch to get the new values in. It didn't automatically update the existing indexes.

Bardicer
  • 1,405
  • 4
  • 26
  • 43
  • I appreciate the multiple downvotes. Too bad the downvoters are incapable of providing anything to defend their lack of thoughts on the topic. – Bardicer Oct 27 '16 at 18:00