You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Alex To <to...@gmail.com> on 2019/09/18 05:41:20 UTC

Best way to re-index with Jena full text search

Hi everyone

I have a question. I want to add a new field for Jena Full Text search
using EntityDefinition.set(String field, Node predicate).

For e.g. if I want to include ("prefLabel", SKOS.prefLabel) as a new
mapping, then obviously I need to re-index existing data because I think
Jena creates index entries as triples are added.

So the question is what is the most efficient way to re-index existing data
or do I have to re-import all data again each time I add a new field?

Thanks a lot

Best regards

Re: Best way to re-index with Jena full text search

Posted by Osma Suominen <os...@helsinki.fi>.
Hi Alex!

You don't have to reload all data, you can use jena.textindexer instead. 
It will rebuild just the Jena index, which should be much faster than a 
full reload. See here:

https://jena.apache.org/documentation/query/text-query.html#building-a-text-index

-Osma

Alex To kirjoitti 18.9.2019 klo 8.41:
> Hi everyone
> 
> I have a question. I want to add a new field for Jena Full Text search
> using EntityDefinition.set(String field, Node predicate).
> 
> For e.g. if I want to include ("prefLabel", SKOS.prefLabel) as a new
> mapping, then obviously I need to re-index existing data because I think
> Jena creates index entries as triples are added.
> 
> So the question is what is the most efficient way to re-index existing data
> or do I have to re-import all data again each time I add a new field?
> 
> Thanks a lot
> 
> Best regards
> 


-- 
Osma Suominen
D.Sc. (Tech), Information Systems Specialist
National Library of Finland
P.O. Box 15 (Unioninkatu 36)
00014 HELSINGIN YLIOPISTO
Tel. +358 50 3199529
osma.suominen@helsinki.fi
http://www.nationallibrary.fi