lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor Hadianto" <vic...@hadianto.net>
Subject Re: Rephrase My Question - How To Search Database With More Than One Pair of Property/Value as Parameters Using Lucene?
Date Tue, 04 Nov 2003 03:02:23 GMT
Something like this?

Query query = QueryParser.parse("\"Victor Hugo\" title:Miserables",
"author", new StandardAnalyser();

or

Query query = QueryParser.parse("\"Victor Hugo\" title:Miserables
category:history", "author", new StandardAnalyser();

/victor

----- Original Message ----- 
From: "Caroline Jen" <jiapei_jen@yahoo.com>
To: <lucene-user@jakarta.apache.org>
Sent: Tuesday, November 04, 2003 1:52 PM
Subject: Rephrase My Question - How To Search Database With More Than One
Pair of Property/Value as Parameters Using Lucene?


> I raised the question two days ago.  My question was
> too specific to the application that I have been
> working on. I have decided to re-phrase my question.
>
>      People say that Lucene is very flexible.  I
> wonder if there is a method signature that would be
> suitable to my needs.  Or there are way to go about
> it.
>
>      I am using lucene as the searching enging to look
> for articles that are stores in the database.
> It is OKay to search articles in the database using
> "only one" pair of property/value as parameters in a
> method; for example:
>
> ********Property***************Value
>
> *********author************Victor Hugo or .....
> *********title*************Les Miserables or .....
> ********content***************whatever .....
> **********id*********************168
>
> visitors of the web site queries all articles in the
> database by selecting 'author' as the property and
> supply the name of the author (xyz) as value.
>
> I am stuck because I need to pass additonal parameters
> rather than using one pair of property/value as
> parameters -- I have this field "category" in my
> database. I want to search and get all the articles
> written by author(property) with name xyz (value)
> within; say, the HISTORY category. The value of the
> category will be supplied by the application developer
> (NOT BY THE VISITOR of the web site via selecting from
> a drop-down list and fill out the value in the text
> field).
>
> Is there a method signature available in Lucene to
> pass additional parameter as necessary? If not, how
> does Lucene handle this kind of situation.  Thanks in
> advance.
>
>
>
> __________________________________
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam.yahoo.com/whatsnewfree
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message