Text Query via SQL or REST API?

classic Classic list List threaded Threaded
5 messages Options
joseheitor joseheitor
Reply | Threaded
Open this post in threaded view
|

Text Query via SQL or REST API?

Is it possible to perform a full text search query operation via either the
SQL interface? Or the REST API interface?

And does this (or the Java API) automatically leverage Lucene indexing as
per the documentation example for a TextQuery? Or are there other specific
operations or configurations required to use the Lucene indexing features?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
dkarachentsev dkarachentsev
Reply | Threaded
Open this post in threaded view
|

Re: Text Query via SQL or REST API?

Hi,

REST API does not have such option, but you can write your own compute task
(that uses Java API) and call it from REST [1]. It's not possible to use
Lucene search from SQL interfaces.

To use full text search you need to annotate fields with @QueryTextField [2]
and add to indexed types [3].
Ignite will automatically manage Lucene indexes and you'll be able to search
with a TextQuery.

Also, please note that Lucene indexes work only in in-memory mode [4].

[1] https://apacheignite.readme.io/v2.5/docs/rest-api#execute
[2] https://apacheignite.readme.io/v2.5/docs/cache-queries#text-queries
[3]
https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/configuration/CacheConfiguration.html#setIndexedTypes-java.lang.Class...-
[4] https://issues.apache.org/jira/browse/IGNITE-5371

Thanks!
-Dmitry



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
joseheitor joseheitor
Reply | Threaded
Open this post in threaded view
|

Re: Text Query via SQL or REST API?

Thanks, Dmitry.

What is the recommended strategy to most efficiently perform searches on a
persistent store table containing a column with text (JSON document)...?

Jose



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
dkarachentsev dkarachentsev
Reply | Threaded
Open this post in threaded view
|

Re: Text Query via SQL or REST API?

Jose,

Unfortunately there is no other tools at the moment. But you still can
contribute to Apache Ignite and implement that ticket which will persist
Lucene indexes. It would be a great help!

Thanks!
-Dmitry



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Manu Manu
Reply | Threaded
Open this post in threaded view
|

Re: Text Query via SQL or REST API?

In reply to this post by joseheitor
Hi! take a look to
https://github.com/hawkore/examples-apache-ignite-extensions/ they are
implemented a solution for persisted lucene indexes that supports SQL
searching




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