CatgirlIntelligenceAgency/code/services-core/search-service/readme.md

31 lines
1.2 KiB
Markdown
Raw Normal View History

2023-03-04 14:00:46 +01:00
# Search Service
This service handles search traffic and is the service
you're most directly interacting with when visiting
[search.marginalia.nu](https://search.marginalia.nu).
2023-03-22 16:59:38 +01:00
It interprets a "human" query and translates it into a
request that gets passed into to the index service, which finds
related documents, which this service then ranks and returns
to the user.
2023-03-22 17:02:03 +01:00
![image](../../../doc/diagram/search-service-map.svg)
2023-03-22 17:02:03 +01:00
2023-03-04 14:00:46 +01:00
## Central classes
2023-03-17 16:21:52 +01:00
* [SearchService](src/main/java/nu/marginalia/search/SearchService.java) receives requests and delegates to the
2023-03-04 14:00:46 +01:00
appropriate services.
2023-03-04 14:05:24 +01:00
* [CommandEvaluator](src/main/java/nu/marginalia/search/command/CommandEvaluator.java) interprets a user query and acts
2023-03-04 14:00:46 +01:00
upon it, dealing with special operations like `browse:` or `site:`.
2023-03-04 14:05:24 +01:00
* [QueryFactory](src/main/java/nu/marginalia/search/query/QueryFactory.java) parses a search query into a machine readable query specification.
* [SearchQueryIndexService](src/main/java/nu/marginalia/search/svc/SearchQueryIndexService.java) passes a parsed search query to the index service, and
2023-03-04 14:00:46 +01:00
then decorates the search results so that they can be rendered.
## See Also
2023-03-22 16:59:38 +01:00
* [features-search](../../features-search/)