What you can do, is adding a custom search field with the singer name into your document to be indexed :

    doc.add(new StringField("singername", myValue, Store.NO));

Than you query you index like this:

String myquery="(singername:\" + searchphrase + "\") or (" + searchphrase + ")";

in this case the value of the field singername will not be analyzed by the standard analyzer.


On 06.03.2017 09:15, Yonghui Zhao wrote:
Lucene standard anlyzer will remove almost all punctuation.
In some cases, we want to keep some punctuation, for example in music
search, some singer name and album name could be a punctuation.

Is there any analyzer that we can customized punctuation to be removed?



--
*Imixs*...extends the way people work together
We are an open source company, read more at: www.imixs.org <http://www.imixs.org>
------------------------------------------------------------------------
Imixs Software Solutions GmbH
Agnes-Pockels-Bogen 1, 80992 München
*Web:* www.imixs.com <http://www.imixs.com>
*Office:* +49 (0)89-452136 16 *Mobil:* +49-177-4128245
Registergericht: Amtsgericht Muenchen, HRB 136045
Geschaeftsfuehrer: Gaby Heinle u. Ralph Soika

Reply via email to