Is there any way to highlight a text without indexing it? such as lucene highlighter that get text and query as a parameter an highlight it.
No, I do not think that is possible. What is your use case? What exactly are you looking to achieve?
Check out the percolate api - you can store queries and then run JSON against them. Supports highlighting.
Christian thanks for your answer.
Exactly I want to use elasticsearch in my desktop application locally (not in a server). For security, data shouldn't store in elastic. data of documents is encrypted and stored in a sqlite database. So i need to highlight documents after searching.
Thanks for your answer.
But i think elasticsearch need a _highlight endpoint as _analyze endpoint.
Lucene support this and i think elastic can do it.
Then why use Elasticsearch? Why not highlight in your application so it matches what you searched for?
I index my documents and search in them by elasticsearch and i want to highlight results by it. i don't have any highlighter that can highlight my documents by my query an custom analyzer.
I'm not sure why that would be the case. Can you explain further what is broken?
When i dont store my data in elasticsearch and disable _souce field because of security then elasticsearch can not highlight results. so i must highlight them my self or find a way that elasticsearch can highlight a text by my query and my analyzer.
OK - I expect you're on your own here then.
Disabling source gives a reduced experience for a variety of reasons (highlighting, reindexing).
We do offer security features that protect documents so that is not normally the reason we'd see people resort to disabling source (usually it is people seeking to have absolutely minimal storage space).
How can i protect my data when my indices are in the user's system. As I said my indices aren't in a server. My application works offline and elasticsearch is installed on the user system.
Sorry, I don't understand the distinctions you're drawing.
Elasticsearch security prevents access to the content of elasticsearch documents held in an elasticsearch index.
If you haven't enabled elasticsearch security, disabling source does not prevent attackers from discovering what was in the original documents via other means.
I think that all Elasticsearch security features are efficient when the elasicsearch is installed in a server and data(indices) is not in the client( If I'm wrong, correct it). But in my case, data(indices) are available to the user and he can install an elasticsearch and get data by a simple query. So I disable source so that it could not easily get source of documents and only can search in them.
Is there any way that I can protect source of data(indices) when data is available? for example data encryption or other ways.
Thank you for your patience.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.