lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "david.w.smiley@gmail.com" <david.w.smi...@gmail.com>
Subject Re: Is MemoryIndex and Spatial stuff combination supported?
Date Thu, 21 Jan 2016 02:40:59 GMT
Yup.
Just to clarify for the O.P., after getting the SpatialStrategy instance,
call createIndexableFields() which returns a list of Field instances, which
you can then call tokenStream() on as Alan indicated.  This should work
fine for any of the SpatialStrategy instances.

On Wed, Jan 20, 2016 at 2:09 PM Alan Woodward <alan@flax.co.uk> wrote:

> Depending on the type of field, you can normally do:
>
> Field myField = …
> index.addField(fieldName, myField.tokenStream(null, null))
>
> I agree that this could be a bit nicer, though.  MemoryIndex doesn't
> support DocValues yet either, although I think there is an open ticket to
> add that.
>
> Alan Woodward
> www.flax.co.uk
>
>
> On 20 Jan 2016, at 18:32, xavi jmlucjav wrote:
>
> > Hi,
> >
> > I am on lucene 5.3.1
> >
> > I am running a doc at a time through a bunch of Queries. This is working
> > nicely with the MemoryIndex and combinations of
> > TermQuery/NumericRangeQuery. Now I wanted to add spatial stuff, so I
> > happily added more queries with SpatialStrategy.makeQuery(...).
> >
> > But, when I go to add the corresponding field to the MemoryIndex...I am
> not
> > sure how to do this, the only way to add fields to a MemoryIndex seems:
> >
> > MemoryIndex index = new MemoryIndex();
> > index.addField("content", "Readings about Salmons and other select
> > Alaska fishing Manuals", analyzer);
> > index.addField("author", "Tales of James", analyzer);
> >
> > Is this combination possible?? I expected (naively?) it would work out of
> > the box.
> >
> > thanks
> > xavi
>
> --
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message