lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Huber <gregh3...@gmail.com>
Subject Re: Depreciated IntField field in v6
Date Fri, 15 Apr 2016 18:35:59 GMT
Thanks, guess I should have been using StoredField in the firstplace!

document.add(new StoredField(FieldConstants.LUCENE_WEIGHT_LINES,
catalogue.getSearchWeight()));


On 15 April 2016 at 17:40, Robert Muir <rcmuir@gmail.com> wrote:

> On Fri, Apr 15, 2016 at 11:48 AM, Greg Huber <gregh3269@gmail.com> wrote:
> > Hello,
> >
> > I was using the IntField field to set the weight on my suggester.
> > (LegacyIntField works)
> >
> > old:
> >
> > document.add(new IntField(
> >                     FieldConstants.LUCENE_WEIGHT_LINES,
> > catalogue.getSearchWeight(), Field.Store.YES));
> >
> > I tried to use the IntPoint but it does not seem to work:
> >
> > new:
> >
> > document.add(new IntPoint(FieldConstants.LUCENE_WEIGHT_LINES,
> >                     catalogue.getSearchWeight()));
> >
> > Is this the correct way t do it now?  There is no Field.Store.YES?
>
> It is equivalent to Field.Store.NO: it just indexes it for search. If
> you want to store separately you need to also add a StoredField (can
> be the same field name of course).
>
> I opened this issue to improve the docs:
> https://issues.apache.org/jira/browse/LUCENE-7223
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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