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

[SearchSnippet] Highlight memory implementation #5255

Closed
hungphan227 opened this issue Aug 28, 2024 · 7 comments
Closed

[SearchSnippet] Highlight memory implementation #5255

hungphan227 opened this issue Aug 28, 2024 · 7 comments
Assignees
Labels
Milestone

Comments

@hungphan227
Copy link

hungphan227 commented Aug 28, 2024

  • Create memory class
  • Use search method of SimpleMessageSearchIndex to get the list of MessageId
  • Use the list of MessageId to retrieve list of Message
  • For each Message, find text that specified in SearchQuery and add highlight tag around them

DoD: Integration test

@vttranlina
Copy link
Member

For each Message, find text that specified in SearchQuery and add highlight tag around them

In the epic topic
Benoit mentioned:

Locate part of their text (exact match) and show 100 chars before and 100 chars after. Ideally find a library for that.

@hungphan227
Copy link
Author

I think we can use java regular expression

@vttranlina
Copy link
Member

What do you think about using lucene-highlighter for it?
The @quantranhong1999 poc at #5256

IMO it quiet fine!

// Initialize an in-memory index using ByteBuffersDirectory
        Directory directory = new ByteBuffersDirectory();

Lucene "memory" for SearchSnippet memory implement
Lucene "prod" for SearchSnippet Lucene implement

@chibenwa
Copy link
Member

chibenwa commented Aug 28, 2024

What do you think about using lucene-highlighter for it?

...

I LOVE THE IDEA

A LOT

(and I would go further)

How about removing scanning search and replacing it with a memory based Lucene?

Of course we can trigger a mailing list discussion...

@Arsnael
Copy link
Member

Arsnael commented Aug 29, 2024

Use searchHilighter interface instead

@Arsnael Arsnael removed the grooming label Sep 27, 2024
@vttranlina vttranlina self-assigned this Sep 30, 2024
@chibenwa chibenwa added this to the Sprint #43 milestone Sep 30, 2024
@vttranlina
Copy link
Member

How about removing scanning search and replacing it with a memory based Lucene?

mailing-list:
https://www.mail-archive.com/server-dev@james.apache.org/msg74520.html

@vttranlina
Copy link
Member

WIP pr apache#2429

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

No branches or pull requests

4 participants