I am recreating lucene indexes with neo4j-rest-client:
http://neo4j-rest-client.readthedocs.org/en/latest/indices.html
Will sorting be applied by default by lucene?
If not or not satisfactory, how to change sorting ?
E.g. syntax in python driver:
i1.add("key", "value", n2)
looks like:
assertContains( index.query( "name", "\"Thomas Anderson\"" ), node );
in http://neo4j.com/docs/stable/indexing-create-advanced.html
and we are all happy.
But I cannot find info about sorting:
http://neo4j.com/docs/stable/indexing-lucene-extras.html#indexing-lucene-sort
My goal is to limit the query to a few results, ALREADY sorted
(and not sorting all results having matched a full-text query).
Il giorno mercoledì 19 agosto 2015 23:30:29 UTC+2, gg4u ha scritto:
>
> Hi, I am struggling to overcome the problem that query:
>
> START
>
> against a full-text index will display results not meaningfully sorted.
>
> E.g. using wikipedia as mockup data:
> query
> 'united states'
>
> will hit, as first result:
> 'List of United States National Historic Landmarks in United States
> commonwealths and territories, associated states, and foreign states'
>
>
> I cannot paginate results, cause first results would be meaningless.
> I have to fetch *all *results first, and then (in python) order them -
> but it takes too long and it s not the way to go.
>
> I posted also a question on SO:
>
> http://stackoverflow.com/questions/31862761/search-queries-in-neo4j-how-to-sort-results-in-neo4j-in-start-query-with-intern
>
> and then found a comment of Michael answering to a similar question:
>
> http://stackoverflow.com/questions/26497068/lucene-in-neo4j-has-some-misbehaviours-in-terms-of-reliable-search-querys-comp
>
>
>> #1 can be handled in Neo4j's Java API by using index.query(new
>> QueryContext(query).sort(Sort.RELEVANCE));
>
>
> So far I've been learning and using cypher and python, never used java.
> Could you please suggest *any* tutorial or how to in *python*, or at
> least appoint to which files should I look to modify if JAVA is the only
> way, so to obtain a meaningful relevance of results in START query that I
> can paginate?
>
> I haven't found this aspect in neo4j-rest-client or, if there are, it is
> not clear to me if sort.relevance is covered:
> http://neo4j-rest-client.readthedocs.org/en/latest/indices.html
>
> It is an important aspect of (my) application cause it allows to start the
> traversal and any operation on the graph.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.