You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Seth Fitzsimmons <se...@gmail.com> on 2006/03/09 15:50:24 UTC
[ANN] Searchable 0.6.2 - Annotations for Lucene
Searchable is a toolkit for Lucene that harnesses the power of
annotations to specify what properties to index and how to treat them.
A sample annotated interface:
public interface Sample extends Searchable {
public Integer getId();
@Indexed(boost=2.0F)
public String getName();
@Indexed
public String getDescription();
}
Indexing:
// ...
BeanIndexer bi = new BeanIndexer();
// add a sample Sample instance, indexing the description and name properties
bi.add( makeSample() );
bi.close();
Searching:
// ...
BeanSearcher s = new BeanSearcher();
// searches on all fields by default; can be overridden using @DefaultFields
ResultSet rs = bi.search("seth");
for (Result result : rs) {
// result is actually a stripped down instance of SampleImpl.
}
More information (and examples) here:
http://mojodna.net/searchable/
Feedback / questions / comments encouraged.
seth
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: [ANN] Searchable 0.6.2 - Annotations for Lucene
Posted by Seth Fitzsimmons <se...@gmail.com>.
> I have already implemented in my application using annotations.
> and some changes to query input in my application.
How has it worked out for you?
> I don't see where you provide Analyzer annotation. It seems u forgot it.
Not forgotten (though it could make a good addition); the intention is
to set the Analyzer in use within a custom subclass of AbstractIndexer
or AbstractBeanIndexer using setAnalyzer().
> Nice coincidence.
Cool! I'm curious - what sorts of alternate design decisions did you
make with your implementation?
seth
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
RE: [ANN] Searchable 0.6.2 - Annotations for Lucene
Posted by Ramana Jelda <ra...@ciao-group.com>.
Hi,
Exactly,
I have already implemented in my application using annotations.
and some changes to query input in my application.
I don't see where you provide Analyzer annotation. It seems u forgot it.
Nice coincidence.
Jelda
> -----Original Message-----
> From: Seth Fitzsimmons [mailto:seth.fitzsimmons@gmail.com]
> Sent: Thursday, March 09, 2006 3:50 PM
> To: java-user@lucene.apache.org
> Subject: [ANN] Searchable 0.6.2 - Annotations for Lucene
>
> Searchable is a toolkit for Lucene that harnesses the power
> of annotations to specify what properties to index and how to
> treat them.
>
> A sample annotated interface:
>
> public interface Sample extends Searchable {
> public Integer getId();
>
> @Indexed(boost=2.0F)
> public String getName();
>
> @Indexed
> public String getDescription();
> }
>
> Indexing:
> // ...
> BeanIndexer bi = new BeanIndexer();
> // add a sample Sample instance, indexing the description and
> name properties bi.add( makeSample() ); bi.close();
>
> Searching:
> // ...
> BeanSearcher s = new BeanSearcher();
> // searches on all fields by default; can be overridden using
> @DefaultFields ResultSet rs = bi.search("seth"); for (Result
> result : rs) {
> // result is actually a stripped down instance of SampleImpl.
> }
>
> More information (and examples) here:
> http://mojodna.net/searchable/
>
> Feedback / questions / comments encouraged.
>
> seth
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org