Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User
prefix query works, term query does not
 

Index | Next | Previous | View Flat


efkarr at gmail

Feb 16, 2012, 12:34 AM


Views: 308
Permalink
prefix query works, term query does not

Hello,
I have a noobie question. I am trying to implement a small poc app.I have
lots of sharded indexes in a folder and i am trying to read them like this:
MultiReader reader = new MultiReader(list.toArray(new
IndexReader[list.size()]));
IndexSearcher searcher = new IndexSearcher(reader,
Executors.newFixedThreadPool(6));

then i am getting the query from the command line and executing it like
this:
QueryParser parser = new QueryParser(Version.LUCENE_35,
"default-field", new StandardAnalyzer(Version.LUCENE_35));
Query q = parser.parse(query);

i dont have a default-field actually but i could not figure out what else
to put in there.

Anyway leys say i have an IP address in one of the fields, when i query it
like this:
ip=8.8.8.*
ip=8.8.8.8*
i am able to find it but when i query it with the exact value:
ip=8.8.8.8
there are no hits.

I am able to query it successfully on the same index using luke,

Does anyone have a pointer about what is it that i am doing wrong?

Cheers
Mete

Subject User Time
prefix query works, term query does not efkarr at gmail Feb 16, 2012, 12:34 AM
    Re: prefix query works, term query does not ian.lea at gmail Feb 16, 2012, 3:02 AM
    Re: prefix query works, term query does not flozano at gmail Feb 16, 2012, 3:13 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.