[prev in list] [next in list] [prev in thread] [next in thread] 

List:       solr-user
Subject:    Re: Search for All CAPS words
From:       Alexandre Rafalovitch <arafalov () gmail ! com>
Date:       2015-07-30 18:53:18
Message-ID: CAEFAe-Evfystyp3-YQ8=JDAbsCaE-EzzMRceeznDzcjo7txaLw () mail ! gmail ! com
[Download RAW message or body]

So, what you want is to duplicate a specific token, rename one of the
copies, and inject it with the same offset as the original. So GATE =>
gate, _gate but gate=>gate.

That, to me, is a custom token filter. You can probably use
KeywordRepeatFilterFactory as a base:
http://www.solr-start.com/javadoc/solr-lucene/org/apache/lucene/analysis/miscellaneous/KeywordRepeatFilterFactory.html
 (you can click through to the Filter and then source from there).

Regards,
   Alex.
----
Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
http://www.solr-start.com/


On 30 July 2015 at 13:53, rks_lucene <ppro.info@gmail.com> wrote:
> Thanks and I did think of the copy field option. So what you are suggesting
> is that I have a copyfield in which I do not keep the lowercase factory
> analyzer in my indexing/query chains.
> 
> I am afraid that would not help if my search query is complex with many
> words (say a boolean with proximity operators) because the full search
> string would have go into the copyfield (not having the lowercase). The rest
> of the words other than /GATE/ wouldnt match properly then.
> 
> Ritesh
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: \
> http://lucene.472066.n3.nabble.com/Search-for-All-CAPS-words-tp4219893p4219959.html \
> Sent from the Solr - User mailing list archive at Nabble.com.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic