Liferay 7.0 - search for words with underscore

thumbnail
Vitaliy Koshelenko, modified 6 Years ago. Expert Posts: 319 Join Date: 3/25/11 Recent Posts
Hi!


I'm using Liferay 7.0, and I need search to be able to find words with undescore ('_').
For example, seach for "development' should find documents/articles/etc. with 'liferay_development' title.

In 7.1 seach works in this way, but in 7.0 does not.

How can I achieve such functionality in 7.0 ?

Related Jira issue: https://issues.liferay.com/browse/LPS-77598


Regards,
Vitaliy
thumbnail
Jorge Díaz, modified 6 Years ago. Liferay Master Posts: 753 Join Date: 1/9/14 Recent Posts
¿Which search engine are you using in Liferay 7.0? ¿Elasticsearch 2.x, Elasticsearch 6.1 or Solr?

If you are using Elasticsearch 2.x perhaps you can try upgrading to Elasticsearch 6.1, as it is one of the changes included in Liferay 7.1, see:You have also to update your system to Liferay 7.0 GA7 or newer.
thumbnail
Vitaliy Koshelenko, modified 6 Years ago. Expert Posts: 319 Join Date: 3/25/11 Recent Posts
Thanks Jorge,

I was using default bult-in Elasticsearch, bundled with Liferay (ce-ga-4).
​​​​​​​Will try to upgrade to Elasticsearch 6.1.

Regards,
Vitaliy
thumbnail
Jorge Díaz, modified 6 Years ago. Liferay Master Posts: 753 Join Date: 1/9/14 Recent Posts
Hi Vitaliy
Vitaliy KoshelenkoThanks Jorge,

I was using default bult-in Elasticsearch, bundled with Liferay (ce-ga-4).
​​​​​​​Will try to upgrade to Elasticsearch 6.1.

Regards,
Vitaliy
Do NOT use embedded Elasticsearch in production. Embedded Elasticsearch is useful for development and demonstration purposes, but shouldn't be used in production environments.
For more information see: https://dev.liferay.com/discover/deployment/-/knowledge_base/7-1/configuring-elasticsearch-for-liferay-0#embedded-vs-remote-operation-mode
thumbnail
Vitaliy Koshelenko, modified 6 Years ago. Expert Posts: 319 Join Date: 3/25/11 Recent Posts
Jorge,



Thanks! We're already using a standalong Elasticsearch in production (and have lr 7.0 ga7). 

Is there a way for achieving this w/o updading Elasticsearch to 6.1?

Perhaps, it's possible to specify custom analyzer or tokenizer (to split word with '_' to individual search terms) ?



Regards,
Vitaliy