-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
add a query interface which provides search results like the yjson API from legacy YaCy #11
Comments
I would like to work on this. 👍 |
@nikhilrayaprolu @Orbiter How to proceed with this issue? |
@harshit98 according to this issue we might have to create a YjsonResponse similar to this https://github.com/yacy/yacy_search_server/blob/6fe735945da97abcbb91ac545fb11cff9d48effc/source/net/yacy/cora/federate/solr/responsewriter/YJsonResponseWriter.java |
additional files related to yacysearch.json End point could be found here. |
@harshit98 what is the status of this issue. @Orbiter any suggestions you would like to give regarding this? |
@nikhilrayaprolu I have not started it. |
I already implemented the search service in most parts here: https://github.com/yacy/yacy_grid_mcp/blob/master/src/main/java/net/yacy/grid/mcp/api/index/YaCySearchService.java Because the mcp is the part which has the elasticsearch connection, the search api is also inside the mcp. What this code has not yet implemented are the facets - no facets at all. To implement them, the search endpoint must be changed in such a way that it uses https://github.com/yacy/yacy_grid_mcp/blob/master/src/main/java/net/yacy/grid/io/index/ElasticsearchClient.java#L726 To do that, a QueryBuilder object must be constructed from the query. Code for this can be copied from https://github.com/yacy/yacy_grid_mcp/blob/master/src/main/java/net/yacy/grid/io/index/ElasticsearchClient.java#L670 Once the search endpoint is changed and is working, the facets can be taken from the aggregations object https://github.com/yacy/yacy_grid_mcp/blob/master/src/main/java/net/yacy/grid/io/index/ElasticsearchClient.java#L714 |
@Orbiter I am trying to build the QueryBuilder object and make it use the Query class
right now if we check we are not passing any order_field and aggregations. if so what should be the default values to be passed for both of these parameters? |
This shall implement the query attributes as described in http://www.yacy-websuche.de/wiki/index.php/Dev:APIyacysearch
It shall additionally understand Solr facet query attributes.
The result format is not documented well. It shall return the same result that susper.com understands.
Here is an example:
http://yacy.searchlab.eu/solr/select?hl=false&wt=yjson&facet=true&facet.mincount=1&facet.field=url_file_ext_s&start=0&rows=10&query=berlin
The query interface uses elasticsearch as search endpoint and translates the result into the yjson format.
The text was updated successfully, but these errors were encountered: