ChrisdeG/MendixLucene

Show result context

Opened this issue · 2 comments

I'm using version 1.0.2 of the MendeixLucene engine and it works great.
The only this is that the SearchResult only returns a Mendix type and a Mendix ID. Neither of which is giving me much information about the actual object.

It would be good to have at least the text of the objects returned in the SearchResult.
If at all possible, just the context of where the text from the query was found (like Google does).

On the same page: if there is a relevance score available, this would also be nice to have in the search results.

Kind regards,

Ronald van Puijenbroek.

You have to make an association from the searchResult to the actual object, the module will fill that connection for you

Perhaps a bit more explanation: I am using the full text search to search through different types of entities. The result will also show results of all different types. This means, that it is not possible to show all the results details via the associations directly in a datagrid.
This means I have to post-process all my results to retrieve the relevant data, store it in yet another non-persistable object, which costs time and is a (possible) performance issue.
At the same time, the index already has the text where it found the what I was looking for and it can return this with the search result (one additional attribute to the SearchResult-entity, one additional line of java code to store the text in the additional entity).