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:
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
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
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
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,
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
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
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
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
; > 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
> 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
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
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:
13 matches
Mail list logo