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

Need to implement the ancestor filter with IN operator for LOINC #1512

Closed
dmuylwyk opened this issue Sep 26, 2019 · 2 comments · Fixed by #1516
Assignees
Labels

Comments

@dmuylwyk
Copy link
Collaborator

@dmuylwyk dmuylwyk commented Sep 26, 2019

Carried over from #1454 and #1505

Still figuring my way around Lucene.

I've got this:

theBool.must(theQb.keyword().onField("myParentPids").matching("" + code.getId()).createQuery());

where myParentPids is a field for a space-delimited string of entity IDs. In this case, I'm getting all of the parent IDs for a given code ID, which Lucene resolves to returning the actual parent codes. This works.

Now I want to get all of the parent IDs for a given collection of code IDs. Basically: "select c.myParentPids from TermConcept c where c.myId IN (1, 2, 3,...n);" except I don't care about the parent IDs themselves, Lucene will return the actual parent codes.

I've tried

theBool.must(theQb.keyword().onField("myParentPids").matching(values).createQuery());

where values is a String[] or List but that's not working; I get

org.hibernate.search.bridge.BridgeException: Exception while calling bridge#objectToString
	entity class: ca.uhn.fhir.jpa.entity.TermConcept
	entity property path: myParentPids
	field bridge: TwoWayString2FieldBridgeAdaptor [stringBridge=org.hibernate.search.bridge.builtin.StringBridge@4e47b636]

I've also tried the string representation of the collection but that's equivalent to putting in a junk ID.

@dmuylwyk

This comment has been minimized.

Copy link
Collaborator Author

@dmuylwyk dmuylwyk commented Sep 30, 2019

@dmuylwyk

This comment has been minimized.

Copy link
Collaborator Author

@dmuylwyk dmuylwyk commented Sep 30, 2019

Pull request: #1516

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.