You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by zbyszek <zb...@yahoo.com> on 2017/11/23 16:59:24 UTC

Sorting or ranking TextQuery?

Hello All,I am looking at the TextQuery feature of Ignite (2.2).I have read
(https://manikandansubbu.wordpress.com/tag/lucene/) that Lucene "returns
results ranked by either the relevance to the query or sorted by an
arbitrary field such as a document’s last modified date".I also am aware
that in Ignite I cannot combine sql and text queries
(http://apache-ignite-users.70518.x6.nabble.com/Combine-SQL-and-Text-Query-td7455.html)
thus cannot aply SQL 'order by' for searches based on lucene index.I would
like to ask (in fact to confirm the lack of below) if Ignite supports:-
sorting of TextQuery results- controlling/implementing own scoring (by means
of say Query classes as mentined here:
https://lucene.apache.org/core/2_9_4/scoring.html)These questions are in the
context of the situation where I have multiple exactly the same text values
but from different sources and I would like to rank returned entities by the
source (or other arbitrary field in general).Thank you for the help,zbyszek



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Sorting or ranking TextQuery?

Posted by "ilya.kasnacheev" <il...@gmail.com>.
Hello!

I haven't heard about any improvements to TextQuery in 2.4. You should
probably ask such questions on developer maillist, and considering
contributing improvements.

Regards,



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Sorting or ranking TextQuery?

Posted by piyush <co...@gmail.com>.
Is Ranking implemented in latest version 2.4  or at least in roadmap ?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Sorting or ranking TextQuery?

Posted by zbyszek <zb...@yahoo.com>.
Andrew,
Thank you for your response.

>>So, it looks like this integration has very limited scope of use.
I was interested in one particular Lucene feature which is described as
"Lucene returns results ... sorted by an arbitrary field", so any way of
influencing order/ranking in the query result would be really helpful.
Seems like H2 integration with Lucene could do the trick.

Regards,
zbyszek



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Sorting or ranking TextQuery?

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi,

1. Ignite (from 2.1 version) has dependencies to Lucene 5.5.2 verison. So,
documentation you reference to may be out dated,
2. Ignite doesn't support configuration for underlying Lucene. Feel free to
create a ticket if you need smth.
3. Ignite has separate dependencies of H2 and Lucene underneath. H2 is used
for Sql queries and Lucene uses for TextQueries.
Ignite supports SqlQuery and TextQuery as different kind of queries for
different engines, this is why they can't be combined within same query.

Looks like latest versions of H2 support integration with Lucene engine for
full text search queries,
but it will not work with Ignite without additional fixes due to dependency
conflicts and other H2 issues:

"To use the Apache Lucene full text search, you need the Lucene library in
the classpath. Currently, Apache Lucene 3.6.2 is used for testing. Newer
versions may work, however they are not tested."
"The Lucene fulltext search supports searching in specific column only. "
"The Lucene fulltext search implementation is not synchronized internally.
If you update the database and query the fulltext search concurrently
(directly using the Java API of H2 or Lucene itself), you need to ensure
operations are properly synchronized"

Also, I see no example where SQL and Lucene indices used within same query.
So, it looks like this integration has very limited scope of use.

On Thu, Nov 23, 2017 at 7:59 PM, zbyszek <zb...@yahoo.com> wrote:

> Hello All, I am looking at the TextQuery feature of Ignite (2.2). I have
> read (https://manikandansubbu.wordpress.com/tag/lucene/) that Lucene
> "returns results ranked by either the relevance to the query or sorted by
> an arbitrary field such as a document’s last modified date". I also am
> aware that in Ignite I cannot combine sql and text queries (
> http://apache-ignite-users.70518.x6.nabble.com/Combine-
> SQL-and-Text-Query-td7455.html) thus cannot aply SQL 'order by' for
> searches based on lucene index. I would like to ask (in fact to confirm the
> lack of below) if Ignite supports: - sorting of TextQuery results -
> controlling/implementing own scoring (by means of say Query classes as
> mentined here: https://lucene.apache.org/core/2_9_4/scoring.html) These
> questions are in the context of the situation where I have multiple exactly
> the same text values but from different sources and I would like to rank
> returned entities by the source (or other arbitrary field in general).
> Thank you for the help, zbyszek
> ------------------------------
> Sent from the Apache Ignite Users mailing list archive
> <http://apache-ignite-users.70518.x6.nabble.com/> at Nabble.com.
>



-- 
Best regards,
Andrey V. Mashenkov