How to customize search api query?
I have already added index from backend also added server.
By following this link but didn't get any solution.
https://api.drupal.org/api/drupal/modules%21search%21search-results.tpl.php/7.
Related
I am implementing Algolia search on my Drupal-9 website and using the following contributed modules:
Search API Algolia
Facets
After configuring the modules, the content/data indexing is working fine and is reflecting on Algolia server.
For search page, I am using Drupal views of type Index Algolia index and search is working fine using the Full text search filter.
After configuring the Facets, the block is displaying the Content Type facet and showing the total count as well like
page (12)
blog (9)
Upon clicking these facets, the search results are not filtered.
I have configured the Type Facet and its display on Algolia server.
On Algolia server the facets and search is working fine and as expected but Facets not working on my Drupal site.
I am not using any specific value in Filter key while configuring facet source configuration
I am trying to retrieve data of page type via rest service in Kentico 10.
What should be format of base URL for sending Post request and for checking content on browser?
If you want to retrieve content you have to use GET (not POST). POST is for creating resources, PUT is for updating.
From the documentation:
The base URL of the Kentico REST service is /rest.
For example, if your site is running at http://localhost/Kentico, use
http://localhost/Kentico/rest as the base URL of the service.
This is how you retrieve all documents with all their coupled data:
http://localhost/Kentico/rest/content/currentsite/en-us/all/?coupleddata=true
Again, see the documentation for all the examples.
Try something like this:
/content/currentsite/<culture>/all/?classnames=<class code name>
Here you can find all the details on getting content/data via Kentico rest service.
I'm currently working on a POC that uses Azure Search to make an Angular Front End.
I've searched everywhere and am looking for a way to query for the index schema.
What do I mean by this? On this page you can use a PUT to create an index using JSON.
Is there a way to get this JSON schema back using a GET or using the Azure Portal? I want to be able to populate a NavBar with the facetable fields without having to hard code them. Is this possible?
You can call Get Index REST API to get the schema of an Index.
Your request URL would be:
https://[service name].search.windows.net/indexes/[index name]?api-version=[api-version]
You would need Admin Key to authenticate the Get Index request.
You will need to parse fields element from the response body to get the list of all attributes of the index.
Trying to find out how to do Google image searches via an API / REST call. Apparently the image search API is deprecated and directs us to the Custom Search API.
But my first experiments with the Custom Search API, return results from my own website !!&*%%%$##!, which is not helpful in the slightest.
I need image results from Google images. Anyone have an example query that works?
You will basically want to generate a URL like this. Note the search type parameter at the end.
https://www.googleapis.com/customsearch/v1?key=YOUR API KEY&cx=YOUR CUSTOM SEARCH ENGINE IDENTIFIER&q=your query&searchType=image
You can read more here https://developers.google.com/custom-search/json-api/v1/using_rest
edit: changed searchType to lowercase based on comment below
I spent 2 days studying "Seach Api Module" in Drupal
Somebody can explain for me , What is Purpose of "Server"
and "Index" in "Search APi Module",
Why we need to Create "Server" and "Index", and We Can I find them, Does
"Index" create a xml file like Solr Server
Thanks in advance!
The Server is what's doing the searching and where the content defined by the index is being held. An example would be Database Search or Search API Solr.
The Index defines what fields are going to be indexed, as well as other settings pertaining to your search such as facets. It is tied to a type of content, like node, taxonomy terms, or users.
If you have Search API installed, you can find the settings at example.com/admin/config/search/search_api. There you can add your Server and define your Index.