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 nettadalet <ns...@dalet.com> on 2020/12/08 10:56:00 UTC

Is there a way to search for "..." (three dots)?

Hi,
I need to be able to search for "..." (three dots), meaning the query should
be "..." and the search should return results that have "..." in their
names.
Is there a way to do it?
Thanks in advance.



--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Is there a way to search for "..." (three dots)?

Posted by Erick Erickson <er...@gmail.com>.
Yes, but…

Odds are your analysis configuration for the field is removing the dots.

Go to the admin/analysis page, pick your field type and put examples in
the “index” and “query” boxes and you’ll see what I mean.

You need something like WhitespaceTokenizer, as your tokenizer,
and avoid things like WordDelimiter(Graph)FilterFactory.

You’ll find this is tricky though. For instance, if you index
“…something is here”, WhitespaceTokenizer will split this into
“…something”, “is”, “here” and you won’t be able to search for 
“something” since the _token_ is “…something”.

You could use one of the other tokenizers or use one of the
regular expression tokenizers.

Best,
Erick

> On Dec 8, 2020, at 5:56 AM, nettadalet <ns...@dalet.com> wrote:
> 
> Hi,
> I need to be able to search for "..." (three dots), meaning the query should
> be "..." and the search should return results that have "..." in their
> names.
> Is there a way to do it?
> Thanks in advance.
> 
> 
> 
> --
> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html