Suppose I have a book index with field="publisher", field="title", etc.
I want to search for books only from "Manning", do I have to do anything
special? how?
Thanks,
-James
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protectio
On 9/15/05, James Huang <[EMAIL PROTECTED]> wrote:
>
> Suppose I have a book index with field="publisher", field="title", etc.
> I want to search for books only from "Manning", do I have to do anything
> special? how?
>
add new BooleanClause(new TermQuery(new Term("publisher","Manning")), true,
Thanks Jason.
I wonder if that's the same as
queryString + " publisher:Manning"
and pass on to the query parser?
-James
--- Jason Haruska <[EMAIL PROTECTED]> wrote:
> On 9/15/05, James Huang <[EMAIL PROTECTED]> wrote:
> >
> > Suppose I have a book index with
> field="publisher", field="tit
: I wonder if that's the same as
:
: queryString + " publisher:Manning"
:
: and pass on to the query parser?
assuming queryString is a java variable containing your initial query,
then you are close, but not quite. If you want to tell QueryParser to
make a clause "required" then you have to pre
Yes, "+" is what I missed! Thanks.
Suppose there is a book published by 3 publishers (I
don't know how that works in real world):
// At index time:
doc.add( Field.Keyword("publisher", "Manning") );
doc.add( Field.Keyword("publisher", "SAMS") );
doc.add( Field.Keyword("publisher", "O'Reilly"
On Thu, 2005-09-15 at 11:56 -0700, James Huang wrote:
> Yes, "+" is what I missed! Thanks.
>
> Suppose there is a book published by 3 publishers (I
> don't know how that works in real world):
>
> // At index time:
> doc.add( Field.Keyword("publisher", "Manning") );
> doc.add( Field.Keyword("p
On Sep 15, 2005, at 12:55 PM, James Huang wrote:
Thanks Jason.
I wonder if that's the same as
queryString + " publisher:Manning"
and pass on to the query parser?
I will emphasize the other comments made on this regarding the
Analyzer. I recommend against programatically adding to the s