2011/3/16 Rick Bullotta <[email protected]>

> Hi, all.
>
>
>
> Looking at the documentation for the new index framework in the Wiki at:
> http://wiki.neo4j.org/content/Index_Framework, it isn't all that clear how
> fulltext queries are to be executed (what's the key name?), how they can be
> sorted (can you sort by score?), etc.
>
>
>
Anders is working on that documentation and will arrive any day now. But
until then I could outline some information here:

So, there are two #query methods, one with and one w/o key. The one with the
key parses the query you enter, assuming that everything is about that
property key, f.ex if you've added:

   index.add( node, "name", "Mattias Persson" );

to a fulltext index and then query (remember that fulltext index lower-cases
everything by default):

  index.query( "name", "matt*" );
  // or
  index.query( "name", "matt* OR persson" );

it will query for matt* (or matt* OR persson) values for the "name"
property. Using the other method you can do the same thing:

  index.query( "name:matt*" );
  index.query( "name:matt* OR name:persson" );

_but_ you can also query stuff from different property keys in one query,
making compound queries possible, like:

  index.query( "name:matt* AND profession:hacker" );


>
> Can anyone shed any light on how all this stuff works in the context of
> fulltext?  Definitely some more examples/documentation would be very
> helpful.
>
> The query methods are also available for exact indexes. The difference
between fulltext and exact is the way the added values are tokenized. The
exact index doesn't do any tokenization, just puts the values as one value,
whereas fulltext index tokenizes the added values into individual words and
indexes those separately.


>
> Thanks,
>
>
>
> Rick
>
>
>
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [[email protected]]
Hacker, Neo Technology
www.neotechnology.com
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to