lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan LaPlante" <blapla...@netwebapps.com>
Subject Re: Simple searching ?
Date Wed, 04 Jun 2003 01:29:11 GMT
if you used the indexer from the demo to create your index, try changing the
parse(query, "content", analyzer) to contents instead of content. Also make
sure you are creating an analyzer for the third argument.

Analyzer analyzer = new StandardAnalyzer();

Bryan

----- Original Message -----
From: "Guilherme Barile" <gui@prosoma.com.br>
To: "Lucene" <lucene-user@jakarta.apache.org>
Sent: Tuesday, June 03, 2003 10:19 AM
Subject: Simple searching ?


> Hi
> I'm still getting started with lucene, and I can't search my index (It
> exists). I also couldn't find any docs regarding searching, so, if you
> could tell me at least this bit is right :
>
> searcher = new IndexSearcher(IndexReader.open(this.indexDir));
> hits = searcher.search(QueryParser.parse(query, "content", analyzer));
>
> Do I need anything else ? (The variables and objects are declared, query
> is a string)
>
> thanks in advance
>
> gui
>
>
> ---------------------------------------------------------------------
> 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