Foros de discusión

How to use dismax query parser with SOLR

Guilhem ESTEVE, modificado hace 8 años.

How to use dismax query parser with SOLR

New Member Mensajes: 3 Fecha de incorporación: 9/10/14 Mensajes recientes
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, modificado hace 8 años.

RE: How to use dismax query parser with SOLR

Liferay Master Mensajes: 735 Fecha de incorporación: 5/07/11 Mensajes recientes
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, modificado hace 8 años.

RE: How to use dismax query parser with SOLR

New Member Mensajes: 3 Fecha de incorporación: 9/10/14 Mensajes recientes
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, modificado hace 8 años.

RE: How to use dismax query parser with SOLR

New Member Mensajes: 2 Fecha de incorporación: 11/07/14 Mensajes recientes
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, modificado hace 8 años.

RE: How to use dismax query parser with SOLR

New Member Mensajes: 3 Fecha de incorporación: 9/10/14 Mensajes recientes
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.