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

Highlighting Support #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dclemenzi
Copy link
Contributor

#91 Implemented support for highlights

Copy link
Contributor

@sjudeng sjudeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! The implementation approach looks good to me. Can you add a test and also add documentation for the new feature (https://github.com/ngageoint/elasticgeo/blob/master/gs-web-elasticsearch/doc/index.rst)?

@dclemenzi
Copy link
Contributor Author

Yeah I will put together a unit test and documentation.

@sjudeng
Copy link
Contributor

sjudeng commented Feb 11, 2019

Can you rebase this on the latest master branch when you get a chance?

@dclemenzi
Copy link
Contributor Author

Sorry other priorities have come up and I have not gotten back to the unit tests that you request. Also I have been rethinking how the aggregation and highlighting were implemented. Not sure passing database proprietary JSON to the query as a hint is the best approach. Been thinking about adopting a custom function such as highlight(PropertyName) or aggregate(PropertyName, ...) so the interface will be common across multiple database implementations. The FilterToElastic would of course need to translate the function. Maybe there are other solutions already available in the geotool libraries, have not really looked. Thoughts?

@sjudeng
Copy link
Contributor

sjudeng commented Feb 12, 2019

Adding as a custom function sounds like an interesting idea but I haven't looked at it either. The use of viewparams was modeled after what's done in SolrDataStore. Let me know whether you want to continue with this PR or hold it while you explore the possible alternate implementation.

@dclemenzi
Copy link
Contributor Author

We have used custom functions before to handle other edge cases so I know it would work. Just not sure if its the correct solution. I am sure others have run into the same issue using geotool APIs so I would not be surprised if there was not some approach already within geotools. When I get around to implementing something more generic (highlighting and aggregations) it would probably be best to continue supporting the hints (maybe as deprecated) to avoid breaking anyone depending on it. We are still using version 19.3 of geotools so we are not using the master branch so merging this has no impact on us. Its up to you whether you want to accept this implementation or wait for a more generic approach. Can't say when I will get back to this.

@sjudeng
Copy link
Contributor

sjudeng commented Feb 12, 2019

Sounds good. Thanks for the rebase.

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

Successfully merging this pull request may close these issues.

2 participants