Skip to content

feat: add extended property types#49

Merged
bs-quantori merged 15 commits intomainfrom
feature/data-types-task0.1
Nov 20, 2025
Merged

feat: add extended property types#49
bs-quantori merged 15 commits intomainfrom
feature/data-types-task0.1

Conversation

@bs-quantori
Copy link
Copy Markdown
Collaborator

Description:

  • extend Property.PropertyType with seven new data kinds and document each one
  • add a Lombok-backed PropertyValue container plus regression tests
  • bump cqp-api to 0.0.17 and update in-repo consumers

Issue Link:

Closes #N/A (architecture-planning data-types Task 0.1)

Testing:

  • cd chem-query-platform && GRADLE_USER_HOME=.gradle-home ./gradlew :cqp-api:test
  • cd chem-query-platform && GRADLE_USER_HOME=.gradle-home ./gradlew :cqp-api:publishToMavenLocal

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

public static final Map<Property.PropertyType, String> TYPES_MAP = Map.of(
Property.PropertyType.STRING, co.elastic.clients.elasticsearch._types.mapping.Property.Kind.Wildcard.jsonValue(),
Property.PropertyType.DATE, co.elastic.clients.elasticsearch._types.mapping.Property.Kind.Date.jsonValue(),
Property.PropertyType.DECIMAL, co.elastic.clients.elasticsearch._types.mapping.Property.Kind.Double.jsonValue()
);
public static final
Map<co.elastic.clients.elasticsearch._types.mapping.Property.Kind, Property.PropertyType> KINDS_MAP = Map.of(
co.elastic.clients.elasticsearch._types.mapping.Property.Kind.Wildcard, Property.PropertyType.STRING,
co.elastic.clients.elasticsearch._types.mapping.Property.Kind.Date, Property.PropertyType.DATE,
co.elastic.clients.elasticsearch._types.mapping.Property.Kind.Double, Property.PropertyType.DECIMAL
);

P1 Badge Map extended property types to Elasticsearch kinds

Seven new values were added to Property.PropertyType, but ElasticIndexMappingsFactory still only enumerates STRING, DATE and DECIMAL in TYPES_MAP and KINDS_MAP. When a library defines a property with any of the new kinds (e.g. BINARY or HTML), ElasticsearchMoleculesResourceAllocator will look up the Elasticsearch type using this map and format a mapping with "type": "null", which Elasticsearch rejects. Likewise, property-type discovery from existing indices will return null because KINDS_MAP has no entries for the new kinds. As written, the extended types cannot be indexed or read back from Elasticsearch.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@bs-quantori bs-quantori force-pushed the feature/data-types-task0.1 branch from 96a37f8 to 20932a0 Compare November 19, 2025 18:59
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@bs-quantori bs-quantori self-assigned this Nov 19, 2025
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@bs-quantori
Copy link
Copy Markdown
Collaborator Author

@codex can you approve this?

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

case EQUAL -> fieldType == Property.PropertyType.STRING
? QueryBuilders.match(mq -> mq.field(fieldName).query(convertedValue.toString()))
: QueryBuilders.term(tq -> tq.field(fieldName).value(x -> x.anyValue(JsonData.of(convertedValue))));

P1 Badge New property types use term queries on non-searchable fields

Equality/inequality filters for property values now route all non-STRING types through a term query (ElasticsearchStorageMolecules.java:354-357). The newly added types such as BINARY, HYPERLINK, CHEMICAL_STRUCTURE, STRUCTURE_3D, and HTML are mapped to Elasticsearch binary or analyzed text variants (match_only_text, text, search_as_you_type; see ElasticIndexMappingsFactory.java:29-42), so a term query either triggers a runtime error (binary fields are not indexed) or bypasses analysis and returns no hits. Any search using the new types with EQUAL/NOT_EQUAL will therefore fail or silently misbehave. Adjust the query construction or mappings so these new types use supported search semantics (or are rejected) instead of a raw term query.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Collaborator

@Mrromanmaksimov Mrromanmaksimov left a comment

Choose a reason for hiding this comment

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

...

@bs-quantori bs-quantori merged commit ff48cc5 into main Nov 20, 2025
2 checks passed
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