Re: No hits when querying multiple fields

2010-07-27 Thread Erick Erickson
H, what analyzers are you using at index and query time? Are they identical? But I think your basic problem is phrases. Parsing text:"hello world" expects the words "hello" and "world" to appear sequentially in the text field. Try something like title:(+hello +world). But depending upon how yo

Re: No hits when querying multiple fields

2010-07-27 Thread Geir Gullestad Pettersen
Just to clarify some things that could be misunderstood. First, I meant that I added two fields to a document which was then indexed, not two separate documents. Second, I noticed in the lucene mail archive that some additional charactes, especially "*", had sneaked into my query examples. This w

No hits when querying multiple fields

2010-07-27 Thread Geir Gullestad Pettersen
Consider the following two documents which I have added to my index: doc.add( new Field("text", "hello world", Field.Store.YES, > Field.Index.ANALYZED)); > doc.add( new Field("id", "1", Field.Store.YES, Field.Index.ANALYZED)); > Using the StandardQueryParser I can retrieve my document with eithe

Re: Querying multiple fields in a document

2007-02-25 Thread Nicolas Lalevée
Le dimanche 25 février 2007 12:35, Laxmilal Menaria a écrit : > Hi, i think you will use MultiSearcher and create a field and Value array > for that, that will solve your problem.. I don't know what was your issue Laxmilal, but Ruchika just need a simple query : "+name:bob +subject:maths". Nicol

Re: Querying multiple fields in a document

2007-02-25 Thread Laxmilal Menaria
Hi, i think you will use MultiSearcher and create a field and Value array for that, that will solve your problem.. thanks On 2/25/07, ruchi thakur <[EMAIL PROTECTED]> wrote: Hello, I am new to Lucene. I have a document with 3 fields - name,subject,rollno I want to search on the 2 field name

Querying multiple fields in a document

2007-02-24 Thread ruchi thakur
Hello, I am new to Lucene. I have a document with 3 fields - name,subject,rollno I want to search on the 2 field names name and subject ie; i want to search for documents having a particular combination of name and subject, (say all the documents with name as bob and subject as maths) . Would a

Re: Beginner Querying multiple fields pls help

2006-01-20 Thread Chris Hostetter
1) instead of building up a string, and giving it to QueryParser, i would suggest you look at the MultiFieldQueryParser 2) it sounds like what you are interested regarding the category field, is not to restrict your search to a particular handfull of categoryIds, but to a large set of categories

RE: Beginner Querying multiple fields pls help

2006-01-20 Thread Ashley Rajaratnam
n values for CategoryID Let me know Cheers A -Original Message- From: Hemant Joshi [mailto:[EMAIL PROTECTED] Sent: Friday, January 20, 2006 4:25 PM To: java-user@lucene.apache.org Subject: Re: Beginner Querying multiple fields pls help You have to set bq.setMaxClauseCount value as the

Re: Beginner Querying multiple fields pls help

2006-01-20 Thread Hemant Joshi
You have to set bq.setMaxClauseCount value as the default number of clauses BooleanQuery supports is 1024. I am guessing you have categoryIDs between 1-3 which means more than 1024 clauses. -Hemant setMaxClauseCount Ashley Rajaratnam wrote: Hi, Please forgive me if this comes a

Beginner Querying multiple fields pls help

2006-01-20 Thread Ashley Rajaratnam
Hi, Please forgive me if this comes across as being naïve however Ive bashed my head against it for a while and can’t come up with a solution. Overview: I have the following basic document structure: … Document doc = new Document(); doc.Add(Field.Text("itemtitle", iteminf.itemtitle))

Re: querying multiple fields

2005-06-22 Thread Erik Hatcher
On Jun 22, 2005, at 2:02 PM, George Abraham wrote: Erik, That worked like a charm. It seems to me that reading up on the different analyzers would solve a lot of questions in my mind. It would solve a lot of folks questions! I find the analysis part of Lucene fascinating. The really inter

Re: querying multiple fields

2005-06-22 Thread George Abraham
Erik, That worked like a charm. It seems to me that reading up on the different analyzers would solve a lot of questions in my mind. Unfortunately your book has not arrived yet from Amazon. Aarrgh! Thanks a ton! George > Your analyzer is eating the ImageExistsBit:1 because "1" returns no > tokens

Re: querying multiple fields

2005-06-22 Thread Erik Hatcher
On Jun 22, 2005, at 1:24 PM, George Abraham wrote: Otis, I think MultiFieldQueryParser (if I am not mistaken) uses the same query string to search multiple fields. Let me know if it is otherwise. Erik, Let me see if I can answer those questions. Here are some code snippets, by the way. FOR INDE

Re: querying multiple fields

2005-06-22 Thread George Abraham
gt; > > --- George Abraham <[EMAIL PROTECTED]> wrote: > > > All, > > Forgive me for the basic question. When you are querying multiple > > fields using QueryParser, what is the exact code? > > > > I tried QueryParser.parse(queryString, "SearchTerms&q

Re: querying multiple fields

2005-06-22 Thread Otis Gospodnetic
George, You can use MultiFieldQueryParser instead of QueryParser. Otis --- George Abraham <[EMAIL PROTECTED]> wrote: > All, > Forgive me for the basic question. When you are querying multiple > fields using QueryParser, what is the exact code? > > I tried QueryPar

Re: querying multiple fields

2005-06-22 Thread Erik Hatcher
On Jun 22, 2005, at 10:49 AM, George Abraham wrote: All, Forgive me for the basic question. When you are querying multiple fields using QueryParser, what is the exact code? I tried QueryParser.parse(queryString, "SearchTerms", analyzer) where queryString was "SearchTer

querying multiple fields

2005-06-22 Thread George Abraham
All, Forgive me for the basic question. When you are querying multiple fields using QueryParser, what is the exact code? I tried QueryParser.parse(queryString, "SearchTerms", analyzer) where queryString was "SearchTerms:visnu temple ImageExistsBit:1", SearchTerms and ImageExi