I copied that org.apache.lucene.Hits class into the lucene-index component,
so it exists there in that package (and has existed there since the birth of
this component). That's the class that LuceneIndex.search uses, not the one
from lucene-core-3 (since it has been removed).

2010/7/20 Andrew Mutz <andrew.m...@appfolio.com>

> I was changing the neo4j-rest server to use the new lucene-index framework
> myself, and have been very frustrated with this problem.   There seems to
> be
> a lucene version conflict:
>
>  - org.neo4j.index.impl.lucene.LuceneIndex.search() uses
> org.apache.lucene.Hits, which was removed in lucene 3.0
>  - org.neo4j.index.impl.lucene.IndexType.query() seems to assume lucene
> version 3.0 (Version.LUCENE_30)
>
> So I can't use lucene 3.0 or above for the first reason, and I need to use
> 3.0 for the second reason.
>
> How are others able to use this?  Am I doing something wrong?
>
> Maybe I should just wait until your changes go in?
>
> Thanks,
> Andrew.
>
> On Tue, Jul 20, 2010 at 12:38 PM, Mattias Persson <
> matt...@neotechnology.com
> > wrote:
>
> > Sorting by relevance is possible via
> >
> >
> http://components.neo4j.org/neo4j-index/apidocs/org/neo4j/index/lucene/LuceneIndexService.html#getNodes(java.lang.String,%20java.lang.Object,%20org.apache.lucene.search.Sort)<http://components.neo4j.org/neo4j-index/apidocs/org/neo4j/index/lucene/LuceneIndexService.html#getNodes%28java.lang.String,%20java.lang.Object,%20org.apache.lucene.search.Sort%29>
> > .
> > Exposing this sorting thingie would require you to add that in the rest
> > code
> > as well (as you probably could guess). But the IndexService doesn't
> support
> > querying for more than one property at a time.
> >
> > However, there's a new indexing framework in the making over at
> > https://svn.neo4j.org/laboratory/components/lucene-index/ which allows
> you
> > to do these types of queries. This new framework will probably make its
> way
> > into trunk rather soon and eventually replace the indexing found in
> > neo4j-index component today.
> >
> > So the answer is no if you use neo4j-index component (which REST does).
> But
> > it's yes if REST were to use the new framework instead. I'll commit the
> > additions regarding sorting and all that soon (I'm laborating with it
> > a.t.m.). You could f.ex. ask a query like:
> >
> >   for ( Node node : myTitleIndex.query(
> >       new QueryContext( "+title:foo* description:bar" ).sort(
> > Sort.RELEVANCE ) ) {}
> >
> > 2010/7/16 Andrew Mutz <andrew.m...@appfolio.com>
> >
> > > Hi all,
> > >
> > > I've been evaluating using Neo4J for a project at my company and have
> > been
> > > consistently impressed with it's capabilities.  There is one thing I
> need
> > > to
> > > do, however, that I'm not sure is possible.
> > >
> > > I'm using the Neo4J REST server.  I've been using lucene full text
> > > indexing/searching on my node attributes with great success.
> > >
> > > What I want to be able to do is to adjust the relevancy of the results
> > > returned by lucene based on attributes *other* than the one I'm
> searching
> > > on.
> > >
> > > Example:  Nodes have attributes title and description.  I want to
> search
> > > for
> > > all nodes, say, whose title matches "foo*", but have whether or not
> > > description matches "bar*" affect the order of the search results.
> > >
> > > Is this possible?  I'm very comfortable getting my hands dirty in the
> > > source, so if this is going to require some hacking, just point me in
> the
> > > right direction.  I've been extensively modifying the REST server to
> fit
> > my
> > > needs, so ideally my changes would be in that part of the code base.
>  But
> > > I'm willing to dig deeper if necessary.
> > >
> > > Thanks much,
> > > Andrew.
> > >
> > >
> > > --
> > > Andrew Mutz
> > > Senior Software Engineer
> > > AppFolio, Inc.
> > >
> > > 55 Castilian Dr. | Goleta, CA | 93117
> > > Phone: 805.617.2167 | Fax: 805.968.0646
> > > andrew.m...@appfolio.com
> > > www.appfolio.com
> > >
> > >
> >
> -------------------------------------------------------------------------------------
> > > "Web-Based Property Management Software Made Easy."
> > > _______________________________________________
> > > Neo4j mailing list
> > > User@lists.neo4j.org
> > > https://lists.neo4j.org/mailman/listinfo/user
> > >
> >
> >
> >
> > --
> > Mattias Persson, [matt...@neotechnology.com]
> > Hacker, Neo Technology
> > www.neotechnology.com
> > _______________________________________________
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
>
>
>
> --
> Andrew Mutz
> Senior Software Engineer
> AppFolio, Inc.
>
> 55 Castilian Dr. | Goleta, CA | 93117
> Phone: 805.617.2167 | Fax: 805.968.0646
> andrew.m...@appfolio.com
> www.appfolio.com
>
> -------------------------------------------------------------------------------------
> "Web-Based Property Management Software Made Easy."
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



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

Reply via email to