Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
14c53c2
feat: add OpenSearch distance operations and selectors
mmiguerodriguez Sep 23, 2025
df6ffe6
Merge branch 'master' into feature/os-distance-operations
mmiguerodriguez Oct 2, 2025
a356951
feature: added new integration test
mmiguerodriguez Oct 7, 2025
9da8da8
Merge remote-tracking branch 'origin/master' into feature/os-distance…
mmiguerodriguez Oct 9, 2025
54f1eac
remove invalid assertions
mmiguerodriguez Oct 11, 2025
23b7b20
fix tests
mmiguerodriguez Oct 15, 2025
b529331
more test fixes...
mmiguerodriguez Oct 20, 2025
b461a0f
fix test by using default constructor
mmiguerodriguez Oct 22, 2025
bec8eb7
Merge branch 'master' into feature/os-distance-operations
mmiguerodriguez Oct 28, 2025
41fae1f
tests: add PR recommendations
mmiguerodriguez Nov 6, 2025
ae37f6a
Merge remote-tracking branch 'origin/master' into feature/os-distance…
mmiguerodriguez Nov 6, 2025
44452ff
Merge remote-tracking branch 'origin/master' into feature/os-distance…
mmiguerodriguez Nov 11, 2025
f47e055
Merge remote-tracking branch 'origin/master' into feature/os-distance…
mmiguerodriguez Nov 18, 2025
dfe913b
refactor: use if/else chain with warn log for unsupported ops
mmiguerodriguez Nov 18, 2025
5b7e4cd
fix: handle empty expectedTerms to prevent division by zero
mmiguerodriguez Nov 18, 2025
152a361
docs: clarify OpenSearch regex vs Java regex syntax differences
mmiguerodriguez Nov 18, 2025
b82ab2d
refactor: move generic string helpers to DistanceHelper
mmiguerodriguez Nov 18, 2025
7b612ad
fix: return 404 when no data found in age endpoints
mmiguerodriguez Nov 18, 2025
e17daa6
fix: return 404 in students endpoints and add 404 assertions in tests
mmiguerodriguez Nov 18, 2025
a874b55
fix: return 404 in queries endpoints and add 404 assertions
mmiguerodriguez Nov 18, 2025
51ab79a
refactor: move queries module to new folder structure
mmiguerodriguez Nov 18, 2025
4bf9147
style: remove redundant javadoc comments
mmiguerodriguez Nov 18, 2025
9d6a2b0
Merge remote-tracking branch 'origin/master' into feature/os-distance…
mmiguerodriguez Jan 1, 2026
f42b67e
Merge remote-tracking branch 'origin/master' into feature/os-distance…
mmiguerodriguez Jan 13, 2026
fa3216a
fix: add env vars and comment out tests with errors
mmiguerodriguez Jan 21, 2026
4541ab7
fix handle on wrong entity. wip OpenSearchIndexSchema
mmiguerodriguez Jan 22, 2026
a76e8e4
Merge remote-tracking branch 'origin/master' into feature/os-distance…
mmiguerodriguez Jan 22, 2026
173886e
fix: add index schema to ExecutionTracer
mmiguerodriguez Jan 28, 2026
b25da6d
Merge branch 'master' into feature/os-distance-operations
mmiguerodriguez Feb 3, 2026
4984d0f
fix: remove unused pom.xml configuration
mmiguerodriguez Feb 12, 2026
94dde39
Merge remote-tracking branch 'origin/master' into feature/os-distance…
mmiguerodriguez Feb 12, 2026
d6e76b8
Merge branch 'master' into feature/os-distance-operations
arcuri82 Feb 13, 2026
e77f17a
Merge branch 'master' into feature/os-distance-operations
arcuri82 Feb 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions client-java/controller/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,13 @@
<scope>test</scope>
</dependency>

<!--OpenSearch test-->
<dependency>
<groupId>org.opensearch.client</groupId>
<artifactId>opensearch-java</artifactId>
<scope>test</scope>
</dependency>

<!--gRPC RPC test-->
<dependency>
<groupId>io.grpc</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ public final void initOpenSearchHandler() {
List<AdditionalInfo> list = getAdditionalInfoList();
if (!list.isEmpty()) {
AdditionalInfo last = list.get(list.size() - 1);
last.getOpenSearchInfoData().forEach(openSearchHandler::handle);
last.getOpenSearchIndexSchemaData().forEach(openSearchHandler::handle);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.evomaster.client.java.controller.opensearch.OpenSearchHeuristicsCalculator;
import org.evomaster.client.java.instrumentation.OpenSearchCommand;
import org.evomaster.client.java.instrumentation.OpenSearchIndexSchema;
import org.evomaster.client.java.utils.SimpleLogger;

public class OpenSearchHandler {
Expand All @@ -28,6 +31,12 @@ public class OpenSearchHandler {
*/
private final List<OpenSearchCommandWithDistance> commandsWithDistances;

/**
* Info about schemas of the documents of the index extracted from Spring framework.
* Documents of the index will be mapped to the Repository type
*/
private final Map<String, String> indexSchemas;
Copy link
Collaborator

Choose a reason for hiding this comment

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

as for any map, explicitely state here in the comments what the keys are, and what the values are

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure about this, since the indexSchema represents the schema of an OpenSearchIndex, we aren't in control of the keys for this schema.

Still I'll be reviewing if there's a better way to map this attribute.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@mmiguerodriguez , maybe it is a misunderstanding, but I just meant to add docuemtnation, eg, something like:

*  Key -> <some description>
*  Value -> <some description>
*/ 

in other parts of the code, we have comments like:

    /**
     * key -> malformed URI, found in for example in <a> links
     * value -> set of urls of pages in which some malformed link was present
     */
    private val malformedLinks : MutableMap<String,MutableSet<String>> = mutableMapOf()

recall what written in for_developers.md


private final OpenSearchHeuristicsCalculator calculator = new OpenSearchHeuristicsCalculator();

private Object openSearchClient = null;
Expand All @@ -36,6 +45,7 @@ public OpenSearchHandler() {
this.commands = new ArrayList<>();
this.commandsWithDistances = new ArrayList<>();
this.calculateHeuristics = true;
this.indexSchemas = new HashMap<>();
}

public boolean isCalculateHeuristics() {
Expand All @@ -46,6 +56,10 @@ public void handle(OpenSearchCommand command) {
commands.add(command);
}

public void handle(OpenSearchIndexSchema indexSchema) {
indexSchemas.put(indexSchema.getIndexName(), indexSchema.getIndexSchema());
}

public List<OpenSearchCommandWithDistance> getEvaluatedOpenSearchCommands() {
commands.stream()
.filter(command -> command.getQuery() != null)
Expand Down
Loading