Yes, but you can't *read* the document properties from Lucene, can
you? If I indexed a document in Lucene using A=123, B=XXXXX, and
C=March 12, 1993, and I retrieve it using a query where A=123, I
cannot access B or C unless they are node (or relationship) properties
also. I think that's what Eelco is trying to achieve (access to all
of a Lucene document's properties).
On Apr 16, 4:10 am, Mattias Persson <
matt...@neotechnology.com> wrote:
> You don't need to set a node property to index it in lucene. You could just
> do:
>
> index.add( myNode, "my facet key", "my facet value" );
>
> without having that property on the node itself. If that helps.
>
> 2012/4/15 Eelco Hillenius <
eelco.hillen...@gmail.com>
>
>
>
>
>
> > I guess using a node property/ properties to store facets isn't so bad...
> > better than having to rely on neo4j's internals. I'll try that approach.
> > Thanks for your help so far!
>
> > Eelco
>
> > On Sun, Apr 15, 2012 at 10:10 AM, Eelco Hillenius <
> >
eelco.hillen...@gmail.com> wrote:
>
> >> Hi Mattias,
>
> >> I'm trying to implement facetted search. Either using
> >>
https://lucene.apache.org/core/old_versioned_docs/versions/3_5_0/api/...rolling my own. In the former case, I'll need to use writers/ readers
> >> directly, in the latter case, I'd need at least access to the search
> >> documents directly so that I can gather facet fields (which wouldn't be
> >> node properties).
>
> >> The problem with just opening readers/ writers on the directories where
> >> the indexes are stored myself is that the writer(s) that neo4j uses is that
> >> it may take a while before changes are flushed, and when I tried, I got
> >> exceptions like 'org.apache.lucene.index.IndexNotFoundException: no
> >> segments* file found', which seems to be exactly because of that.
>
> >> So ideally, I'd have direct access to a writer and searcher of the
> >> current transaction. Direct access to the search documents would make me
> >> happy too. Or tell me I'm smoking crack and I should just approach this
> >> differently (like for instance make these facets node properties).
>
> >> Thanks,
>
> >> Eelco
>
> >> On Sun, Apr 15, 2012 at 3:03 AM, Mattias Persson <
> >>
matt...@neotechnology.com> wrote:
>
> >>> Hi,
>
> >>> IndexWriter/IndexSearchers aren't exposed and apart from reflection it's
> >>> not possible, unless (as you did) perhaps writing your own index provider.
>
> >>> May I ask you what you need from that low level access?
>
> >>> Best,
> >>> Mattias
>
> >>> 2012/4/14 Eelco Hillenius <
eelco.hillen...@gmail.com>
>
> >>>> The workaround I'm chipping away at now (between getting the first sun
> >>>> shine on my skin and dealing with whiny kids) is to create a custom index
> >>>> provider in my own org.neo4j.index.impl.lucene package. That at least gives
> >>>> me access to most of the things I'm interested in. I can probably make this
> >>>> work for me, though I'd prefer a solution where I don't have to rely on
> >>>> Neo4J's internals :-)
>
> >>>> Cheers,
>
> >>>> Eelco
>
> >>>> On Sat, Apr 14, 2012 at 6:48 AM, Peter Neubauer <
> >>>>
peter.neuba...@neotechnology.com> wrote:
>
> >>>>> Guys,
> >>>>> trying to get hold of Matthias to shed some more expert light on this
> >>>>> :)
>
> >>>>> Cheers,
>
> >>>>> /peter neubauer
>
> >>>>> G: neubauer.peter
> >>>>> S: peter.neubauer
> >>>>> P: +46 704 106975
> >>>>> L:
http://www.linkedin.com/in/neubauer
> >>>>> T: @peterneubauer
>
> >>>>> Neo4j - Graphs rule.
> >>>>> Program or be programmed - Computer Literacy for kids.
> >>>>>
http://foocafe.org/#CoderDojo
>
> >>>>> On Sat, Apr 14, 2012 at 1:07 AM, Lawrence Stone <
vtgbe...@gmail.com>
> >>> Mattias Persson, [
matt...@neotechnology.com]
> Mattias Persson, [
matt...@neotechnology.com]
> Hacker, Neo
Technologywww.neotechnology.com