You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Alireza Salimi <al...@gmail.com> on 2012/06/27 23:22:57 UTC
Searching for digits with strings
Hi,
I was wondering if there's a built in solution in Solr so that you can
search for documents with digits by their string representations.
i.e. search for 'two' would match fields which have '2' token and vice
versa.
Thanks
--
Alireza Salimi
Java EE Developer
Re: Searching for digits with strings
Posted by Sascha Szott <sz...@gmx.de>.
Hi,
as far as I know Solr does not provide such a feature. If you cannot make any assumptions on the numbers, choose an appropriate library that is able to transform between numerical and non-numerical representations and populate the search field with both versions at index-time.
-Sascha
Alireza Salimi <al...@gmail.com> schrieb:
Hi,
Well that's the only solution I got so far and it would work for most of
the cases,
but l thought there might be some better solutions.
Thanks
On Wed, Jun 27, 2012 at 5:49 PM, Upayavira <uv...@odoko.co.uk> wrote:
> How many numbers? 0-9? Or every number under the sun?
>
> You could achieve a limited number by using synonyms, 0 is a synonym for
> nought and zero, etc.
>
> Upayavira
>
> On Wed, Jun 27, 2012, at 05:22 PM, Alireza Salimi wrote:
> > Hi,
> >
> > I was wondering if there's a built in solution in Solr so that you can
> > search for documents with digits by their string representations.
> > i.e. search for 'two' would match fields which have '2' token and vice
> > versa.
> >
> > Thanks
Re: Searching for digits with strings
Posted by Alireza Salimi <al...@gmail.com>.
Hi,
Well that's the only solution I got so far and it would work for most of
the cases,
but l thought there might be some better solutions.
Thanks
On Wed, Jun 27, 2012 at 5:49 PM, Upayavira <uv...@odoko.co.uk> wrote:
> How many numbers? 0-9? Or every number under the sun?
>
> You could achieve a limited number by using synonyms, 0 is a synonym for
> nought and zero, etc.
>
> Upayavira
>
> On Wed, Jun 27, 2012, at 05:22 PM, Alireza Salimi wrote:
> > Hi,
> >
> > I was wondering if there's a built in solution in Solr so that you can
> > search for documents with digits by their string representations.
> > i.e. search for 'two' would match fields which have '2' token and vice
> > versa.
> >
> > Thanks
> >
> > --
> > Alireza Salimi
> > Java EE Developer
>
--
Alireza Salimi
Java EE Developer
Re: Searching for digits with strings
Posted by Upayavira <uv...@odoko.co.uk>.
How many numbers? 0-9? Or every number under the sun?
You could achieve a limited number by using synonyms, 0 is a synonym for
nought and zero, etc.
Upayavira
On Wed, Jun 27, 2012, at 05:22 PM, Alireza Salimi wrote:
> Hi,
>
> I was wondering if there's a built in solution in Solr so that you can
> search for documents with digits by their string representations.
> i.e. search for 'two' would match fields which have '2' token and vice
> versa.
>
> Thanks
>
> --
> Alireza Salimi
> Java EE Developer