留言板

How to use dismax query parser with SOLR

Guilhem ESTEVE,修改在8 年前。

How to use dismax query parser with SOLR

New Member 帖子: 3 加入日期: 14-10-9 最近的帖子
Hello everyone,

my customer have Liferay 6.2 and SOLR.

Query to SOLR are performed using SearcheContext and Indexer classes like that

...
        SearchContext searchContext = SearchContextFactory.getInstance(httpServletRequest);
        searchContext.setKeywords(keyWord.trim());
                
        Indexer indexer = IndexerRegistryUtil.getIndexer(JournalArticle.class.getName());
        Hits hits = indexer.search(searchContext);
...


But I need to perform my queries using Dismax query Parser, not the default one (Lucene)

How I can do that ?
I didn't find how to set the Query parser for my query (in searchcontext ou Indexer objects) ?
thumbnail
Jan Geißler,修改在8 年前。

RE: How to use dismax query parser with SOLR

Liferay Master 帖子: 735 加入日期: 11-7-5 最近的帖子
Question:
Why can't u use the Liferay Abstraction for the search? Do you redirect all search queries to solr? (Solr-search portlet) How did u do the integration? Some more information on your use case would be really helping.
Guilhem ESTEVE,修改在8 年前。

RE: How to use dismax query parser with SOLR

New Member 帖子: 3 加入日期: 14-10-9 最近的帖子
Hi,
first of all, thank you for looking at my question.

> Why can't u use the Liferay Abstraction for the search?
The project rules requires to make searches using solR.

> Do you redirect all search queries to solr? (Solr-search portlet) How did u do the integration?
SolR is activate on Liferay, so all queries go to solR.
After, we use the specific custom search described previously at only one place. Other searches use the liferay native search box.

> Some more information on your use case would be really helping.
I'm not the one how deploy SolR, but I think SolR is added in the classic way : deploying the SolR .war file.
If you need specific information, ask what information you need.
.
Rafael de Faria,修改在8 年前。

RE: How to use dismax query parser with SOLR

New Member 帖子: 2 加入日期: 14-7-11 最近的帖子
Hello,

I have the same situation. I need to use edismax query parser only in a specific situation, where I need to weight the results. So I'm thinking if we can configure the query object on the fly to achieve that.

Guilhem, did you found a solution to this?

Thanks.
Guilhem ESTEVE,修改在8 年前。

RE: How to use dismax query parser with SOLR

New Member 帖子: 3 加入日期: 14-10-9 最近的帖子
Rafael de Faria:

Guilhem, did you found a solution to this?


Hi,

I'm sorry, but i didn't find solution for the moment. This subject in less important than many others on my project so I havent time to search.

But if you find the solution, can you share it.

Good luck

Bye.