You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Michael Barbarelli <mb...@gmail.com> on 2007/02/27 19:21:33 UTC

Fwd: Unable to retreive 2/13 field values

Hello.  I'm using Lucene.NET, but would like to pose the question here in
the Java group since I think the collective expertise here is still valid.
Hope you don't mind.

After indexing data from an Oracle DB using the standard analyzer, I am
using Luke (standardanalyzer) to query at the moment.  Everything works
great, except that for some reason, I'm unable to retrieve any values from
two of the thirteen fields I am indexing, per document.   The fields in
question are "VAT_reg" and "status_desc".  I can see that the data is there
in the index, and I have tried every possible query syntax to retrieve hits
with those values. Nothing seems to work.

            // indexing code

            Document doc = new Document();

            doc.Add(Field.Keyword("rec_id",entity_id.Trim()));
            doc.Add(Field.Text("company_name",entity_name.Trim()));
            doc.Add(Field.Text("VAT_reg",VAT_reg.Trim()));
            doc.Add(Field.Text("add_line1",add_line1.Trim()));
            doc.Add(Field.Text("add_line2",add_line2.Trim()));
            doc.Add(Field.Text("add_line3",add_line3.Trim()));
            doc.Add(Field.Text("add_line4",add_line4.Trim()));
            doc.Add(Field.Text("add_line5",add_line5.Trim()));
            doc.Add(Field.Text("add_line6",add_line6.Trim()));
            doc.Add(Field.Text("country_iso",country_iso.Trim()));
            doc.Add(Field.Text("status_desc",status_desc.Trim()));
            doc.Add(Field.Text("firstname",firstname.Trim()));
            doc.Add(Field.Text("lastname",lastname.Trim()));

            writer.AddDocument(doc);

Valid VAT_Reg values are:

GB821628930  (+VAT_reg:GB* doesn't work)
N/A
FR67421715731

Valid Status_desc values Are:

Live                 (+status_desc:Live doesn't work)
Refer To Buyer
In Progress

Any ideas as to why I cannot retrieve the info in these two fields?  Many
thanks in advance.

Re: Fwd: Unable to retreive 2/13 field values

Posted by Daniel Naber <lu...@danielnaber.de>.
On Tuesday 27 February 2007 19:21, Michael Barbarelli wrote:

> GB821628930  (+VAT_reg:GB* doesn't work)

What about VAT_reg:gb*? Also see QueryParser.setLowercaseExpandedTerms()

Regards
 Daniel

-- 
http://www.danielnaber.de

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org