You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucenenet.apache.org by Daniel Masarin <da...@gmail.com> on 2014/12/04 17:29:49 UTC

Re: Index Metadata in a Numeric Field

I was trying to do this way, but I don't know how to put more than one term
in a NumericField. I did a foreach loop and add each field in a document in
there, but when I consult the store with Luke, there is only the last value
indexed and the others go away. How can I index many terms in a
NumericField?

I was thinking about your sugestion and I think that if I use independent
fields to measure and unit I'll have a problem, because each document have
many measures and units and my search may merge this informations. This way
I'll loking for "150{mm}" and get "150{pol}" because I indexed "150{pol}
200{mm}". Am I right?

Thanks.

Em Sat Nov 29 2014 at 19:48:37, Prescott Nasser <ge...@hotmail.com>
escreveu:

> How about something like?
>
> unit:feet AND measure:[4 to 7]
>
>
> > From: daniel.masarin@gmail.com
> > Date: Sat, 29 Nov 2014 09:17:34 +0000
> > Subject: Re: Index Metadata in a Numeric Field
> > To: user@lucenenet.apache.org
> >
> > OK, I will try to do that. But What Query can I use to search? In this
> way,
> > I will need to search by measure with a Range Query and how about the
> > respective unit measure? What query can I use?
> >
> > Thank you
> >
> > Em Fri Nov 28 2014 at 17:34:24, Prescott Nasser <ge...@hotmail.com>
> > escreveu:
> >
> > > How about two separate fields? One for the value, one for the unit of
> > > measure. You might still normalize your measurements so that you can
> still
> > > search across measurements
> > >
> > > Sent from my Windows Phone
> > > ________________________________
> > > From: Daniel Masarin<ma...@gmail.com>
> > > Sent: ‎11/‎28/‎2014 4:32 AM
> > > To: user@lucenenet.apache.org<ma...@lucenenet.apache.org>
> > > Subject: Re: Index Metadata in a Numeric Field
> > >
> > > Hello, Jonathan
> > >
> > > I thought to do this way but I want to filter the results by the
> measure
> > > units, if I index all in the same field without the unit how can I
> find by
> > > units later? My problem is because I have many units to represent and
> it
> > > can represent many quantities. Do you understand my problem?
> > >
> > > Thank you.
> > >
> > > 2014-11-26 14:55 GMT-02:00 Daniel Masarin <da...@gmail.com>:
> > >
> > > > Hello, Mr
> > > >
> > > > I was trying to index some metadata in a numeric field of lucene
> .net but
> > > > I don’t know how to do it. I built a class to find measures on
> > > > descriptions, that class returns a list of measures in these form:
> > > > “150{inch} 200{mm}” etc. And I want to index these values to search
> for
> > > > them simultaneously, numeric value and the measure unit. How can I do
> > > that?
> > > >
> > > > Thank you.
> > > >
> > >
>