Text Query question

classic Classic list List threaded Threaded
6 messages Options
Jet.Yuen Jet.Yuen
Reply | Threaded
Open this post in threaded view
|

Text Query question

Hi,
   I'm using Ignite Persistence and Text Query in my project. but I got a
problem.
   here is the steps:
     1. put some data into IgniteCache, and with Persistence opened,  then
use TextQuery to get result。
     2. restart the system, after Ignite is ready, use TextQuery to get the
same result。

   when I debug on Windows Eclipse, it is correct most time.  but I failed
to get result on step 2 every time when I run jar on CentOS.  I've used
@QuerySqlField, and it perfoms all correct on both platform. so I was hoping
to get any advice.

sample code:
public class JetAddress implements Serializable {
    @QueryTextField
    private String restaddr;
}

//put
JetAddress p1 = new JetAddress(1, "john Doe has Master Degree MY.");
addrCache.put(1L, p1);


//query
TextQuery txt = new TextQuery(JetAddress.class, "john");

try (QueryCursor<Entry&lt;Long, JetAddress>> masters = addrCache.query(txt))
{
  for (Entry<Long, JetAddress> e : masters) {
    System.out.println(e.getValue().toString());
  }
}



Regards,
jet





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

Re: Text Query question

Hi Jet,

Full text search creates Lucene in-memory indexes and after restart they are
not available, so you cannot use it with persistence. @QuerySqlField enables
DB indexes that are able to work with persisted data, and probably no way to
rebuild them for now.

Thanks!
-Dmitry



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

Re: Text Query question

Hi dkarachentsev,
   Thanks for your answer!  hmm, so I need to put data again after restart.


Regards,
jet






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

Re: Text Query question

Jet,

Yep, this should work, but meanwhile this ticket remains unresolved [1].

[1] https://issues.apache.org/jira/browse/IGNITE-5371

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 question

In reply to this post by Jet.Yuen
Hi! take a look to
https://github.com/hawkore/examples-apache-ignite-extensions/ they are
implemented a solution for persisted lucene and spatial indexes



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

Re: Text Query question

Hi,

Unfortunatelly, it doesn't look as an open source solution.

It is not clear how their Indices are integrated with Ignite page memory.
If they do not use Ignite page memory then how they survive in failover scenarios as no shared test\test results are available?
Otherwise, I bet they have headache each time they merge with new version of Ignite or Lucene or geo-index.

Anyway, their features are awesome, thanks.


On Wed, Jan 9, 2019 at 10:06 PM Manu <[hidden email]> wrote:
Hi! take a look to
https://github.com/hawkore/examples-apache-ignite-extensions/ they are
implemented a solution for persisted lucene and spatial indexes



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


--
Best regards,
Andrey V. Mashenkov
Regards,
Andrew.