Repository navigation
Conversation
We have newer approaches such as the FileStoreAPI and the PackageManager.
… testing works with json query
|
I'd love to review here, but I think I need some more starting information either in a ref guide page or a JIRA, I'm kind of lost right now... |
Yeah... I'll go ahead and write up some ref guide docs! And finish the demo .bats script ;-) |
|
Usually, features like these are discussed in the dev@ list, or in JIRA or a SIP. |
|
This is definitely draft mode code... I opened it as a PR just to be able to track the work, and once it gets a bit furthur, I plan on opening a proper discussion about it. Module? Solr Sandbox? A Component? A full blown package? So many fun options... |
| names.add(TermsComponent.COMPONENT_NAME); | ||
|
|
||
| return names; | ||
| List<String> l = new ArrayList<String>(SearchComponent.STANDARD_COMPONENTS.keySet()); |
There was a problem hiding this comment.
As a result RTG occurs as a default component that causes a problem in an essential cloud test. 😭
There was a problem hiding this comment.
humm... Maybe I just back out this optimization...
There was a problem hiding this comment.
check out the changes I made to back this out, but still keep the name STANDARD_COMPONENTS...
|
|
||
| Set<String> fields = Collections.singleton(schema.getUniqueKeyField().getName()); | ||
| for (DocIterator iter = dl.iterator(); iter.hasNext(); ) { | ||
| sb.append(schema.printableUniqueKey(searcher.getDocFetcher().doc(iter.nextDoc(), fields))) |
There was a problem hiding this comment.
what about commas in id values? Isn't it safer to use json array as a convention for this field?
There was a problem hiding this comment.
humm... maybe? Is that at all ever done? So, most folks are going to take this data, and load it into a pandas dataframe or soemthing like that... Now, since the doc is already JSON.. maybe it's okay to make this a array of JSON as well? Since you already have to parse some JSON to do anything with it......
Neither UBIQuery or UBIQueryStream will ever be used outside of the UBICompoent. Thought about a o.a.s.handler.component.ubi package as well, but this seems more specific...
This doesn't cover converting doc_ids into a JSON array of any type...
Exxcept that we had to change to support TEN standard components by not using Map.of. Also, I couldn't stand the lower case + underscore "standard_components" object name.
I suspect lots of places for fixing. Like pulling out field names into a UBIParams.java file. May want to name space ubi query params under "ubi.".. what about in JSON query?
UBI goes distrib
@epugh did you ever demo this? I don't remember it, and think it'd be an awesome thing to highlight (and a great way to garner interest and get feedback) |
|
Hey @ozlerhakan here si the draft PR... it just needs a bit of love to run in solr cloud mode... |
| RealTimeGetComponent.COMPONENT_NAME, RealTimeGetComponent.class, | ||
| ExpandComponent.COMPONENT_NAME, ExpandComponent.class, | ||
| TermsComponent.COMPONENT_NAME, TermsComponent.class); | ||
| public static final Map<String, Class<? extends SearchComponent>> STANDARD_COMPONENTS; |
There was a problem hiding this comment.
just passed the limit of Map.of!
There was a problem hiding this comment.
That doesn't at all mean you need to go back to HashMap! Tell an LLM this and it'll get this better.
| SOLR_STOP_WAIT=1 solr stop --all >/dev/null 2>&1 | ||
| } | ||
|
|
||
| @test "Track query using UBI with log file." { |
There was a problem hiding this comment.
🤖 This PR adds a new test_ubi.bats (Track query using UBI with log file.). BATS is going away: CATS (SOLR-18642, #5323) has replaced it on main, and SOLR-18645 (#5369) removes the .bats files. Please write it as a new SolrCatsTestCase suite, e.g. UbiTest in solr/packaging/src/test/org/apache/solr/shell/. The PR also renames test_stream.bats to test_streams.bat, which looks unintended and can be dropped. See dev-docs/cats.adoc for porting help.
Description
I am working with other folks, especially Stavros Macrakis (macrakis@gmail.com), to come up with a solution for understanding what users are doing in response to search results. We have great visibility and understanding of an incoming query, what we do with it, and then what docs are sent back. We do NOT have a way of tying that search to then what does the user do next, and if the following query is connected to the original one.
Many teams lean on GA or Snowplow or custom code for tracking click through, add to cart, etc as signals, but nothing that is drop dead simple to use and open source.
Solution
User Behavior Insights is a shared schema for tracking search related activities. There is a basic implementation for OpenSearch and this is a version for Apache Solr.
Tasks to be done:
.exprfile and using it to write to another Solr collection.techproductsas an example?Tests
Bats test to demonstrate the end to end use of UBI.
Checklist
Please review the following and check all that apply:
mainbranch../gradlew check.