Possible to get matched word or field in Examine search?
I am implementing auto suggest for a project I'm working on.
The search is going against multiple fields in a document type (5 or so fields).
I have the auto complete working, but in order to find the actual word that was matched to suggest, I basically have to loop through all the fields in each SearchResult, then see if the string in that field contains a word that could have been matched to display that word. Performance wise, this doesn't seem optimal.
I don't want to display everything that was in the field either since I just want to suggest the particular word the user was typing, so optimally if I could get the word that was matched for each SearchResult that would be best.
Anyone? Other than writing my own logic to find what Examine potentially matched on (which would be duplicating the effort examine has already performed), I don't see how it's possible to implement auto-suggest so that relevant suggestions are shown.
This is for a large healthcare related website that has many searchable fields.
Possible to get matched word or field in Examine search?
I am implementing auto suggest for a project I'm working on.
The search is going against multiple fields in a document type (5 or so fields).
I have the auto complete working, but in order to find the actual word that was matched to suggest, I basically have to loop through all the fields in each SearchResult, then see if the string in that field contains a word that could have been matched to display that word. Performance wise, this doesn't seem optimal.
I don't want to display everything that was in the field either since I just want to suggest the particular word the user was typing, so optimally if I could get the word that was matched for each SearchResult that would be best.
Is what I'm trying to do possible?
Bump.
Anyone? Other than writing my own logic to find what Examine potentially matched on (which would be duplicating the effort examine has already performed), I don't see how it's possible to implement auto-suggest so that relevant suggestions are shown.
This is for a large healthcare related website that has many searchable fields.
There's nothing (simple & performant) in Lucene which provides this so there's nothing that Examine exposes.
Thanks Slace!
is working on a reply...