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

changed string searching #158

Merged
merged 1 commit into from
Jul 14, 2022
Merged

changed string searching #158

merged 1 commit into from
Jul 14, 2022

Conversation

al-niessner
Copy link
Contributor

@al-niessner al-niessner commented Jul 11, 2022

🗒️ Summary

Re-enabled the unit testing for the queries that use the local language.

Seems that wildcards is not well implemented in the later elasticsearch and opensearch implementations. The most recent documentation for either has changed significantly that if searhing for strings, then they offer a short globish like set of patterns. Moved from using wildcards to this new string and it seems to be working.

The eq operator had some problems because it was using should instead of filter for the or condition. SHould returns everything with a score value to represent the closes match from the furthest. Changed over to filter and the or condition is now behaving as expected.

⚙️ Test Data and/or Report

Unittests pass:

$ curl --location --request GET 'http://localhost:8080/gid/any?limit=10&fields=title&q=title%20like%20%22Insight%2BRAD%22' --header 'Accept: text/csv'
title
"InSight RAD Calibrated Data Collection"
"InSight RAD Derived Data Collection"
"InSight RAD Raw Data Collection"
$ curl --location --request GET 'http://localhost:8080/gid/any?limit=10&fields=title&q=title%20eq%20%22InSight%20RAD%2A%22' --header 'Accept: text/csv'

$

♻️ Related Issues

#134
#144

Seems that wildcards is not well implemented in the later elasticsearch and opensearch implementations. The most recent documentation for either has changed significantly that if searhing for strings, then they offer a short globish like set of patterns. Moved from using wildcards to this new string and it seems to be working.

The eq operator had some problems because it was using should instead of filter for the or condition. SHould returns everything with a score value to represent the closes match from the furthest. Changed over to filter and the or condition is now behaving as expected.
@al-niessner
Copy link
Contributor Author

@tloubrieu-jpl @jordanpadams

Needs review. When done, will move it to release 1.0.1 as well.

@tloubrieu-jpl
Copy link
Member

Hi @al-niessner ,

That works except for the like that I have not been able to make work. It is not part of this pull request, right ?

Copy link
Member

@tloubrieu-jpl tloubrieu-jpl left a comment

Choose a reason for hiding this comment

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

Good, I will create a ticket or the like

@tloubrieu-jpl tloubrieu-jpl merged commit 2336d7b into main Jul 14, 2022
@tloubrieu-jpl tloubrieu-jpl deleted the issue_134 branch July 14, 2022 20:20
al-niessner added a commit that referenced this pull request Aug 16, 2022
* Issue 131: increase adaptability (#142)

* endpoints

Had to change the planned endpoints to /gid/{group name} to /pid/{lidvid}. Also had to add /gid and /pid as prefixes for the referencing endpoints as well. The point really is that had to add the prefixes is because swagger cannot tell /{group name} from /{lidvid} even though the group names are a well defined enum. The prefixes allow swagger to identify the endpoints as unique. While the actual characters gid and pid are not required, whatever is chosen must be unique and different.

* reshape the architecture/design

The base architecture is MVC, but the code does not directly represent it. Moved business to model and serializer to view to match the architecture. Reduced the multiple controllers to one and use a facade/plug-n-play pattern (ReferencingLogic) to manage the polymorphism needed  for each of the ancestral paths to find information.

Added a Java enum to do the mapping among the group names and the product class in the data itself. The enum holds the ReferencingLogic allowing either side (controller or model) to work with the given inputs and collect the desired output.

Most of the code in the DAO objects moved to ReferencingLogic implementations. These objects understand the relationship between model elements and internalize the relationship as code. An example is for bundles finding their grandchildren.

* CONTRIBUTING.md updated

Once the refactoring was complete, updated the documentation to reflect the new code naming and its relationship to the architecture/design.

* docker update by Jimmie Young <jdyoung@jpl.nasa.gov>

* Add a Dockerfile for building images for AWS deployments (#151)

* Creation of AWS-specific Dockerfile, update README to indicate its purpose

* Fix typo in both Dockerfiles (extraneous ']' in CMD)

* Anonymous changes from main stomp

* Switch back to 8080 by default (#157)

* fix for 141 (#147) (#156)

* changed string searching (#158) by  Al Niessner <Al.Niessner@xxx.xxx>

Seems that wildcards is not well implemented in the later elasticsearch and opensearch implementations. The most recent documentation for either has changed significantly that if searhing for strings, then they offer a short globish like set of patterns. Moved from using wildcards to this new string and it seems to be working.

The eq operator had some problems because it was using should instead of filter for the or condition. SHould returns everything with a score value to represent the closes match from the furthest. Changed over to filter and the or condition is now behaving as expected.

* Anonymous changes from main stomp

* fixes for issue 162

* fixes for issue 162

* fix for issue 149
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