Hi Edgar,

If I correctly understood your question, all you need to do is call the
query() method on the fulltextIndex object you've got.

The second argument you'll need to pass will be what you're looking for, and
there you can use Lucene query syntax to set up your query. You can take a
look at Lucene's docs, so you can see all the possibilities you got:
http://lucene.apache.org/java/3_0_1/queryparsersyntax.html.

So, to search for something you may have:

IndexHits<Node> nodes = fulltextIndex.query("indexName", "your query with
lucene's syntax goes here");

See if this is what you need.

regards

2011/7/12 刘运杰 <yunjie....@163.com>

> Adriano,thank you for your response.I do run up FullText Search,and notice
> the Configuration for Lucene in Neo4j,that is  "any other configuration is
> passed onto the backend index (e.g. Lucene) to interpret".and then I set  my
>  Analyser for FullText Search, like below :
> Index<Node> fulltextIndex = index.forNodes( INDEX_ENGINE,
> MapUtil.stringMap( IndexManager.PROVIDER, "lucene",
> "analyzer","org.apache.lucene.analysis.cn.ChineseAnalyzer","type",
> "fulltext" ) );
>
>
> but now I need filter FullText Search result, that mean I should set filter
> for lucene,I wonder how to pass filter setting to lucene from Neo4j. And how
> search in search result,Thanks.
>
>
> Edgar.
> At 2011-07-12 21:56:50,"Adriano Henrique de Almeida" <
> adrianoalmei...@gmail.com> wrote:
>
> >Hi Edgard,
> >
> >sure you can do a FullText Search on your data with Lucene and Neo4j. Did
> >you take a look here
> >http://docs.neo4j.org/chunked/1.4/indexing-create-advanced.html
> >
> >If you need any other help, just let us know.
> >
> >Regards.
> >
> >2011/7/12 刘运杰 <yunjie....@163.com>
> >
> >> I  like to filter fulltext search result,but don't kown where to set
> lucene
> >> search filter.
> >>
> >>
> >> I notice  file LuceneIndex.java ,
> >>  line 355,
> >> Hits hits = new Hits( searcher, query, null, sorting, forceScore );
> >> line 370,
> >> Hits hits = new Hits( additionsSearcher, query, null );
> >>
> >>
> >> all pass null for filter.
> >>
> >>
> >> So Neo4j disable lucene search filter?
> >> how setup lucene fulltext search filter?
> >>
> >>
> >> Thanks in advance.
> >>
> >>
> >> Edgar,
> >> _______________________________________________
> >> Neo4j mailing list
> >> User@lists.neo4j.org
> >> https://lists.neo4j.org/mailman/listinfo/user
> >>
> >
> >
> >
> >--
> >Adriano Almeida
> >Caelum | Ensino e Inovação
> >www.caelum.com.br
> >_______________________________________________
> >Neo4j mailing list
> >User@lists.neo4j.org
> >https://lists.neo4j.org/mailman/listinfo/user
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to