examples of using explain method
Could you help me understand how to use the explain method: http://lucene.apache.org/java/3_0_1/api/core/org/apache/lucene/search/Searcher.html#explain%28org.apache.lucene.search.Query,%20int%29 I was wondering if I could use it to find out which terms in my query matched against a particular document. I am using fuzzy matching with the QueryParser. Thanks Rohit Banga
Re: examples of using explain method
Have you tried System.out.println(searcher.explain(blah blah).toString());? Also, Luke will do a lot of this for you, google Lucene Luke HTH Erick On Wed, Mar 10, 2010 at 12:11 PM, Rohit Banga wrote: > Could you help me understand how to use the explain method: > > http://lucene.apache.org/java/3_0_1/api/core/org/apache/lucene/search/Searcher.html#explain%28org.apache.lucene.search.Query,%20int%29 > > I was wondering if I could use it to find out which terms in my query > matched against a particular document. > I am using fuzzy matching with the QueryParser. > > Thanks > > Rohit Banga >
Extending the query
Hi How can i extend the query to add some temporal expressions ? Thank U Lucius -- View this message in context: http://old.nabble.com/Extending-the--query-tp27853936p27853936.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org
Re: Extending the query
This is really unanswerable unless you provide some details. Pretend you're the expert and someone asked you this question; where would you even begin to answer? Please provide more details about what you're trying to accomplish, what you've tried, what kinds of things you expect to index and how queries would work against that data. Best Erick On Wed, Mar 10, 2010 at 1:28 PM, luciusvorenus wrote: > > Hi > > How can i extend the query to add some temporal expressions ? > > Thank U > Lucius > -- > View this message in context: > http://old.nabble.com/Extending-the--query-tp27853936p27853936.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >
Re: examples of using explain method
yes i have printed the output to screen and used Luke to see what explain does. "I was wondering if I could use it to find out which terms in my query matched against a particular document. I am using fuzzy matching with the QueryParser." On Wed, Mar 10, 2010 at 11:56 PM, Erick Erickson wrote: > Have you tried System.out.println(searcher.explain(blah blah).toString());? > > Also, Luke will do a lot of this for you, google Lucene Luke > > HTH > Erick > > On Wed, Mar 10, 2010 at 12:11 PM, Rohit Banga >wrote: > > > Could you help me understand how to use the explain method: > > > > > http://lucene.apache.org/java/3_0_1/api/core/org/apache/lucene/search/Searcher.html#explain%28org.apache.lucene.search.Query,%20int%29 > > > > I was wondering if I could use it to find out which terms in my query > > matched against a particular document. > > I am using fuzzy matching with the QueryParser. > > > > Thanks > > > > Rohit Banga > > > -- Rohit Banga http://www.google.com/profiles/iamrohitbanga
search on documents which DO NOT have field defined
Hi, I have a bunch of documents which do not have a particular field defined. How can define a query do retrieve only those documents? Thanks! - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org
Re: search on documents which DO NOT have field defined
Try -fieldname:[* TO *] as in http://localhost:8983/solr/select/?q=-weight%3A[*+TO+*]&version=2.2&start=0&rows=10&indent=on Tom On Wed, Mar 10, 2010 at 1:48 PM, bgd wrote: > Hi, > I have a bunch of documents which do not have a particular field defined. > How can define a query do retrieve only those documents? > > Thanks! > > - > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >
Re: search on documents which DO NOT have field defined
Oops. I was thinking solr. How about this, to find docs that don't have a value in the weight field? TermRangeQuery trq = new TermRangeQuery("weight", null, null, true, true ); BooleanQuery bq = new BooleanQuery(); bq.add(new MatchAllDocsQuery(), BooleanClause.Occur.MUST); bq.add(trq, BooleanClause.Occur.MUST_NOT); Tom On Wed, Mar 10, 2010 at 2:11 PM, Tom Hill wrote: > Try > > -fieldname:[* TO *] > > as in > > > http://localhost:8983/solr/select/?q=-weight%3A[*+TO+*]&version=2.2&start=0&rows=10&indent=on > > Tom > > On Wed, Mar 10, 2010 at 1:48 PM, bgd wrote: > >> Hi, >> I have a bunch of documents which do not have a particular field defined. >> How can define a query do retrieve only those documents? >> >> Thanks! >> >> - >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org >> For additional commands, e-mail: java-user-h...@lucene.apache.org >> >> >
surrogate pairs
Hi Can Lucene use surrogate pairs (and its term positions or length) ? Thanks, Yuta - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org
Re: surrogate pairs
Please describe the problem you're trying to solve, what *you* mean by "surrogate pairs" and how you'd like Lucene to use them. The lack of these details forces any responder to guess, almost certainly wrongly. Best Erick On Wed, Mar 10, 2010 at 6:52 PM, Yuta Kawadai wrote: > Hi > > Can Lucene use surrogate pairs (and its term positions or length) ? > > Thanks, > Yuta > > - > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >
Re: surrogate pairs
On Wed, Mar 10, 2010 at 6:52 PM, Yuta Kawadai wrote: > Hi > > Can Lucene use surrogate pairs (and its term positions or length) ? > > Thanks, > Yuta Yes, just make sure you use an Analyzer that supports them... unfortunately most of the ones included with released versions of Lucene (e.g. CJKAnalyzer) will not do the right thing, hopefully in the next release they will. -- Robert Muir rcm...@gmail.com - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org
Sharding of Indexes in clucene
Hi, Does the clucene have the concept of Sharding of Indexes. How much performance boost it provides in case of searching.Can we mention to get documents from a perticular shard only, so as to reduce the set of documents to be searched from. Regards, Suman > Oops. I was thinking solr. > > How about this, to find docs that don't have a value in the weight field? > >TermRangeQuery trq = new TermRangeQuery("weight", null, null, true, > true > ); > > BooleanQuery bq = new BooleanQuery(); > > bq.add(new MatchAllDocsQuery(), BooleanClause.Occur.MUST); > > bq.add(trq, BooleanClause.Occur.MUST_NOT); > > > > Tom > > > On Wed, Mar 10, 2010 at 2:11 PM, Tom Hill wrote: > >> Try >> >> -fieldname:[* TO *] >> >> as in >> >> >> http://localhost:8983/solr/select/?q=-weight%3A[*+TO+*]&version=2.2&start=0&rows=10&indent=on >> >> Tom >> >> On Wed, Mar 10, 2010 at 1:48 PM, bgd >> wrote: >> >>> Hi, >>> I have a bunch of documents which do not have a particular field >>> defined. >>> How can define a query do retrieve only those documents? >>> >>> Thanks! >>> >>> - >>> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org >>> For additional commands, e-mail: java-user-h...@lucene.apache.org >>> >>> >> > - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org
Re: Sharding of Indexes in clucene
Hi Suman, Your question is about clucene, perhaps this place would help you better with it. http://lucene.apache.org/lucy/mailing_lists.html#Users Also, talking this question off hand, lucene as such does not support straight off sharding of indexes, you'd have to split the index at the document level using a mechanism created and maintained by you. There ofcourse are implementation schemes that you might want to try so as to split the index and query them using the appropriate searcher, but this logic has to be handled by you. -- Anshum Gupta Naukri Labs! http://ai-cafe.blogspot.com The facts expressed here belong to everybody, the opinions to me. The distinction is yours to draw On Thu, Mar 11, 2010 at 12:32 PM, wrote: > > Hi, > > Does the clucene have the concept of Sharding of Indexes. > How much performance boost it provides in case of searching.Can we mention > to get documents from a perticular shard only, so as to reduce the set of > documents to be searched from. > > > Regards, > Suman > > > Oops. I was thinking solr. > > > > How about this, to find docs that don't have a value in the weight field? > > > >TermRangeQuery trq = new TermRangeQuery("weight", null, null, true, > > true > > ); > > > > BooleanQuery bq = new BooleanQuery(); > > > > bq.add(new MatchAllDocsQuery(), BooleanClause.Occur.MUST); > > > > bq.add(trq, BooleanClause.Occur.MUST_NOT); > > > > > > > > Tom > > > > > > On Wed, Mar 10, 2010 at 2:11 PM, Tom Hill > wrote: > > > >> Try > >> > >> -fieldname:[* TO *] > >> > >> as in > >> > >> > >> > http://localhost:8983/solr/select/?q=-weight%3A[*+TO+*]&version=2.2&start=0&rows=10&indent=on > >> > >> Tom > >> > >> On Wed, Mar 10, 2010 at 1:48 PM, bgd > >> wrote: > >> > >>> Hi, > >>> I have a bunch of documents which do not have a particular field > >>> defined. > >>> How can define a query do retrieve only those documents? > >>> > >>> Thanks! > >>> > >>> - > >>> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > >>> For additional commands, e-mail: java-user-h...@lucene.apache.org > >>> > >>> > >> > > > > > > - > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >