Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return the highlight on search #11

Open
luizkowalski opened this issue Apr 11, 2013 · 3 comments
Open

Return the highlight on search #11

luizkowalski opened this issue Apr 11, 2013 · 3 comments

Comments

@luizkowalski
Copy link

If you are indexing text, by example, with ElasticSearch, you can get a portion of the text where the search was found, using highlight, so that you can highlight content matching the query.
Would be awesome if mongoid_fulltext could do the same.
Is it possible?

@caarlos0
Copy link

This would be great!

👍

@zeevallin
Copy link

Yes, for searching larger texts this would be awesome. 👍

@dblock
Copy link
Contributor

dblock commented Nov 25, 2015

It's a valid feature request. It needs some thought about how it would be implemented in mongoid_fulltext. To be added to this gem it would need to leverage the database, ie. n-gram data stored has associated metadata that points directly to where the text is located in the text being searched, probably just start and end of the word.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants