Hi Sambhodi,
https://github.com/neo4j/community/blob/master/server/src/functionaltest/java/org/neo4j/server/rest/IndexNodeFunctionalTest.java#L222
shows the setup of
http://docs.neo4j.org/chunked/snapshot/rest-api-indexes.html#rest-api-find-node-by-query
which is inserting the same node into the same index with different
key/values and then doing a compound query over it.

Regarding the SDG question - in the core Index API you get an
exception if you try to retrieve and index by name with a different
configuration after it is created for the first time. Since the code
does not give you exceptions, I suspect that the fulltext field is in
a different index, which is why you don't get hits.

Does that make sense?

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Wed, Aug 24, 2011 at 3:01 PM, sambodhi sagi <[email protected]> wrote:
> In graph repository I did not find a method which can be used to fire
> compound query across different keys.
>
> The available methods takes 'key' as input:
>     graphRepository.findAllByQuery(indexname, key, query)
>
> But i my case I want to fire a query across keys. Something like code
> snippet below. It uses graphDatabaseContext instead of spring's
> GraphRepository
>
>     String query = "(name:*" + searchStr + "* OR details:*" + searchStr +
> "*) AND " + NumericRangeQuery.newIntRange("expectedAmount", fromRange,
> toRange, true, true);
>     Index<Node> namedProductIndex =
> graphDatabaseContext.getIndex(Product.class, "product-search");
>     Iterable<Node> nodes = namedProductIndex.query(new
> QueryContext(query).sort(new Sort(sortField)));
>
> Is there no method in graph repository to handle multiple keys?
>
> Thanks,
> Sambodhi
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to