You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "Jet.Yuen" <yc...@bsfit.com.cn> on 2018/02/07 06:52:08 UTC

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/

Re: Text Query question

Posted by Andrey Mashenkov <an...@gmail.com>.
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 <ma...@hotmail.com> 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

Re: Text Query question

Posted by Manu <ma...@hotmail.com>.
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/

Re: Text Query question

Posted by dkarachentsev <dk...@gridgain.com>.
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/

Re: Text Query question

Posted by "Jet.Yuen" <yc...@bsfit.com.cn>.
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/

Re: Text Query question

Posted by dkarachentsev <dk...@gridgain.com>.
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/