Re: Multi field search with values

2012-03-20 Thread Deb Lucene
Hi group, Is there any way to index a document based on a key value (key = text, value = double) pair? For example, we have a situation where - document 1 IBM - 0.5 Google - 0.9 Apple - 0.3 document 2 IBM - 0.6 Google - 0.1 Apple - 0.4 now we need to search using two fields, the name (e.g. "I

Re: Multi field search with values

2012-03-14 Thread Deb Lucene
Hi Ian, thanks a lot for your idea. Yes, it is working now. thanks again --d On Wed, Mar 14, 2012 at 11:52 AM, Ian Lea wrote: > It the keywords are already in the document body (field "content") I > don't see what you gain by indexing them separately and using MFQP. > But that isn't what you a

Re: Multi field search with values

2012-03-14 Thread Ian Lea
It the keywords are already in the document body (field "content") I don't see what you gain by indexing them separately and using MFQP. But that isn't what you are asking. To add a threshold to the query do something like this: BooleanQuery bq = new BooleanQuery(); Query qm = build existing quer

Multi field search with values

2012-03-14 Thread Deb Lucene
Hi Group, I am working on a Lucene search solution for multiple fields. So far, if the fields are of string type I am having no difficulties in retrieving using the MultiFieldQueryParser. For example, my indexing and searching logic look like this - indexing - I am indexing a corpus on the conten

Re: Multi Field search without Multifieldqueryparser

2008-09-23 Thread Erick Erickson
But the "default_field" for your query parser is just that, the default *if nothing else is specified*. So the following would work just fine: QueryParser parser = new QueryParser("default_field", analyzer); query = parser.parse("name:Erin AND name:Brochowich AND organization:ABC AND organization:

Re: Multi Field search without Multifieldqueryparser

2008-09-23 Thread Anshul jain
unstructured query: default_field: abc ^5 and xyz seems to have created a confusion, what I meant was while initializing the parser I have "default_field" as the default text field. So, the query should be: QueryParser parser = new QueryParser("default_field",analyzer); query = parser.parse("abc

Re: Multi Field search without Multifieldqueryparser

2008-09-23 Thread Grant Ingersoll
On Sep 23, 2008, at 8:35 AM, Anshul jain wrote: yes you are partly correct what I need is that lucene should support two type of queries for the following document: name: abc^10 organization: xyz^3 structured query: name: abc and organization: xyz unstructured query: default_field: abc ^5 an

RE: Multi Field search without Multifieldqueryparser

2008-09-23 Thread Dino Korah
eling that this might work. -Original Message- From: Umesh Prasad [mailto:[EMAIL PROTECTED] Sent: 23 September 2008 13:58 To: java-user@lucene.apache.org Subject: Re: Multi Field search without Multifieldqueryparser On Tue, Sep 23, 2008 at 5:28 PM, Grant Ingersoll <[EMAIL PROTECTE

Re: Multi Field search without Multifieldqueryparser

2008-09-23 Thread Umesh Prasad
On Tue, Sep 23, 2008 at 5:28 PM, Grant Ingersoll <[EMAIL PROTECTED]>wrote: > So, the piece I'm missing is how do you know what field for which terms. > In other words how do you know xyz goes against organization and abc > against name. Your wording implies that you don't know this before hand,

Re: Multi Field search without Multifieldqueryparser

2008-09-23 Thread Erick Erickson
Are you sure you want to be boosting the document fields at index time? From Hossman <<>> But Lucene isn't magic, it's an engine that you have to make do what you want. You say "But i do not want to create one more field(default_field) that will contain all the values concatenated in it" Is t

Re: Multi Field search without Multifieldqueryparser

2008-09-23 Thread Anshul jain
yes you are partly correct what I need is that lucene should support two type of queries for the following document: name: abc^10 organization: xyz^3 structured query: name: abc and organization: xyz unstructured query: default_field: abc ^5 and xyz But i do not want to create one more field(de

Re: Multi Field search without Multifieldqueryparser

2008-09-23 Thread Grant Ingersoll
So, the piece I'm missing is how do you know what field for which terms. In other words how do you know xyz goes against organization and abc against name. Your wording implies that you don't know this before hand, yet you are somehow suggesting that Lucene should be able to do it. Corre

Re: Multi Field search without Multifieldqueryparser

2008-09-23 Thread Anshul jain
Here is what I'm trying to do: say a lucene document: name: abc ^10 organization: xyz ^3 ^10 and ^3 are boosts in the document. now if I query name: abc ^5 AND organization: xyz this will work. but if I query (default_field): abc^5 AND xyz this won't work. Now what I want is that a text can be

Re: Multi Field search without Multifieldqueryparser

2008-09-22 Thread Erick Erickson
; > You will pay a penalty here, of bigger index and slower indexing. > > > > -Original Message- > > From: Anshul jain [mailto:[EMAIL PROTECTED] > > Sent: 21 September 2008 20:27 > > To: java-user@lucene.apache.org > > Subject: Multi Field search without

Re: Multi Field search without Multifieldqueryparser

2008-09-22 Thread Umesh Prasad
> So you pass "searchable-mash: George bush and president" to query parser. > > You will pay a penalty here, of bigger index and slower indexing. > > -Original Message- > From: Anshul jain [mailto:[EMAIL PROTECTED] > Sent: 21 September 2008 20:27 > To: java-u

RE: Multi Field search without Multifieldqueryparser

2008-09-22 Thread Dino Korah
to:[EMAIL PROTECTED] Sent: 21 September 2008 20:27 To: java-user@lucene.apache.org Subject: Multi Field search without Multifieldqueryparser Hi! I've a lucene document structured like: Field: Text name: George Bush Sex: Male Occupation: President of USA Now I can have two types of queries: Stru

Multi Field search without Multifieldqueryparser

2008-09-21 Thread Anshul jain
Hi! I've a lucene document structured like: Field: Text name: George Bush Sex: Male Occupation: President of USA Now I can have two types of queries: Structured query: name: George Bush AND Occupation: President Unstructured Query: George Bush AND President. After parsing it will become, value:

Re: multi field search

2007-06-11 Thread karl wettin
11 jun 2007 kl. 07.48 skrev sagar khetkade: But if we dont want to search on field but on the whole document Is it MultiFieldQueryParser you are looking for?

multi field search

2007-06-10 Thread sagar khetkade
right now there is field level search avilable. But if we dont want to search on field but on the whole document then to the query parseer the whole contet is to be passed. If we append the titles (captions or fields) to say index content(which is having all the captions or fields)