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

Changing from a plugin to a standalone CLI application #68

Open
wants to merge 38 commits into
base: main
Choose a base branch
from

Conversation

jzonthemtn
Copy link
Collaborator

Changing from a plugin to a standalone CLI application.

Signed-off-by: jzonthemtn <[email protected]>
Copy link
Collaborator

@wrigleyDan wrigleyDan left a comment

Choose a reason for hiding this comment

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

I left comments regarding pipeline names in the scripts.

I tested calculating judgments with Chorus and got a bunch of errors connected to the JSON structure and fields of the UBI events and queries. I did some local changes and fixed the findings but I think it makes sense to look at them together to make sure we make changes in the right place (here vs Chorus vs the specification vs the UBI JS client).

Other findings:

  • Running the query set generator with a querySetSize of 5 resulted in 6 queries in the query set.
  • Running a query set reported a successful run (Query set run complete: ...). However there were no calculated metrics stored.

Let's have a look together.

@@ -7,4 +7,4 @@ echo "Initializing UBI..."
curl -s -X POST "http://localhost:9200/_plugins/ubi/initialize"

echo "Indexing queries and events..."
curl -s -T "http://localhost:9200/_bulk?pretty" -H "Content-Type: application/x-ndjson" --data-binary @ubi_queries_events.ndjson
curl -X POST 'http://localhost:9200/index-name/_bulk?pretty' --data-binary @ubi_queries_events.ndjson -H "Content-Type: application/x-ndjson"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does that work with index-name?

I'd expect the request to be curl -X POST 'http://localhost:9200/index-name/_bulk?pretty' --data-binary @ubi_queries_events.ndjson -H "Content-Type: application/x-ndjson" and the index names are taken from the requests in the ndjson file

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It does work. Probably a nuance of OpenSearch. The index-name is ignored by OpenSearch. But I agree it's not clear to look at.

@@ -0,0 +1,26 @@
#!/bin/bash -e

curl -X PUT http://localhost:9200/_search/pipeline/hybrid_pipeline -H "Content-type: application/json" -d'
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest we rename the pipeline to represent its functionality, for example filter_pipeline.

#!/bin/bash -e

# Get the search pipeline.
curl -s http://localhost:9200/_search/pipeline/hybrid-search-pipeline | jq
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest we align this pipeline name with the name of the pipeline created in scripts/create-pipeline.sh

"query_set_id": "20b2c5d3-42bf-4aaf-843e-d806e9fcd3c1",
"judgments_id": "69a69c21-f0bb-443e-bf75-bca389704fd0",
"index": "ecommerce",
"search_pipeline": "hybrid_pipeline",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest we rename the pipeline to represent its functionality, for example filter_pipeline.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated the pipeline name.

@jzonthemtn
Copy link
Collaborator Author

  • Running the query set generator with a querySetSize of 5 resulted in 6 queries in the query set.

Found and fixed this one.

@jzonthemtn
Copy link
Collaborator Author

  • Running a query set reported a successful run (Query set run complete: ...). However there were no calculated metrics stored.

I got the metrics indexing now. I had that part removed for a bit. (doh)

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