Not really, non text fields really don't get an analysis chain. The
simplest thing would probably be to use copyField and store it both
textually and as a numeric. You could handle that  on the indexing side
from the client or by writing an update component.

But IPv4 addresses are really just 32-bit numbers, so couldn't you just
store them as numerics and have your front-end format them as pretty text
to display?

Best
Erick


On Thu, Feb 7, 2013 at 11:56 AM, Isaac Hebsh <isaac.he...@gmail.com> wrote:

> Small addition:
> To support query, I probably have to implement an analyzer (query time)...
> An analyzer can be configured on numeric (i.e non TEXT) field?
>
>
> On Thu, Feb 7, 2013 at 6:48 PM, Isaac Hebsh <isaac.he...@gmail.com> wrote:
>
> > Hi.
> >
> > I have to index field which contains an IP address.
> > Users want to query this field using RANGE queries. to support this, the
> > IP is stored as its DWORD value (assume it is IPv4...). On the other
> side,
> > users supply the IP addresses textually (xxx.xxx.xxx.xxx).
> >
> > I can write a new field type, extends TrieLongField, which will change
> the
> > textual representation to numeric one.
> > But what about the stored field retrieval? I want to return the textual
> > form..  may be a search component, which changes the stored fields?
> >
> > Has anyone encountered this need before?
> >
>

Reply via email to