Algolia DocSearch in Docusaurus doesn't bring any results - algolia

my docs-site got approved from Algolia and their crawler also was able to index a few hundred records there, so that side seems to work.
In my docusauras.config.js I have added the following under themeConfig:
algolia: {
appId: '7********C',
apiKey: '9*****************************5',
indexName: 'o******t',
contextualSearch: true,
},
Now the search bar at the top of the site appears but it does not find anything when searching: No results for "xyz" ; whatever I search for (which's on the site ...)
Any ideas what I'm doing wrong? The apiKey is the "Search API Key", right?
Unsuccessfull search on site
Algolia: Application interface (API)
Invitation/Confirmation mail from Algolia:
mail from Algolia

As cmgchess suggested, that's the issue I had:
https://github.com/facebook/docusaurus/issues/7647
The problem is a recent update of Docusaurus, since which contextual search is enabled by default. The problem: Algolia's default config for Docusaurus v1 and older Docusaurus v2 versions didn't have an option for this attribute to configure the crawler.
To solve:
Delete the current index
Copy the new v2 config from https://docsearch.algolia.com/docs/templates/#docusaurus-v2-template or directly create the crawler at https://crawler.algolia.com/admin/crawlers/create
Re-run crawler (will create an index).
Redeploy the Docusaurus site.

Related

Query Elastic App Search with flutter using public api key

I am developing a Flutter mobile and web app to query data from Elasticsearch.
The Elastic App Search provides me a public search key which I would like my Flutter app to use to get data from my index.
All the examples e.g. https://pub.dev/packages/elastic_client do authenticate with basic auth and user/pass.
Are there any approaches or existing libraries which I may use with Flutter?
Currently I am stuck at the very beginning.
I successfully connected the "Search with Elastic App Search" AddOn in Firebase to update my Elastic documents when a document in my Cloud Firestore changes.
In my Flutter app I would like to only query the Elasic index. There is no need for insert, update nor delete.
Before, I used Algolia https://pub.dev/packages/algolia where I could set up e.g.
static const Algolia algolia = Algolia.init(
applicationId: '<my-application-id>',
apiKey: '<my-api-key>',
);
Now I am looking for something similar to connect to my Elastic App Search.
Do I have a general misunderstanding or did I miss anything in my plan?
There's a way to utilize public key with elastic_client, simply place api key as the authorization parameter:
Client.HttpTransport(url: 'https://ES_ENDPOINT:9243/', authorization: "ApiKey <BASE64_ENCODED_VALUE>");
The trick is to add "ApiKey" in front of the hashed/encoded value. Encoded value contains <id>:<api_key>, values generated via POST /_security/api_key (Create ES API key).

Tableau Server REST API to check if view exists

Is there any way to check if a view exists in the site based on its share URL ?
(Tableau Server Version 10.3, Tableau Server REST API version 2.6)
Input: (share URL of a view)
http://my-tableau-server/views/my-workbook-name/my-view-name?:embed=y&:showAppBanner=false&:showShareOptions=true&:display_count=no&:showVizHome=no
Output:
Boolean flag indicating whether the view represented by this share URL exists in a site or not.
I found one option to Query Views for Site where filtering on views is applicable only on the following fields and not on the contentUrl field:
name
createdAt
hitsTotal
ownerName
tags
updatedAt
I do not want to get all the views of a site and filter in my dot net code. Please suggest if there is any other option available.
Thanks!
From my understanding of the Tableau API, there are only two endpoints that allow all views of Sites or a Workbook. Both endpoints don't let you search for a specific view.
The only ways to accomplish what you are trying to do is to filter via the .Net code.

AEM query param being removed and CSRF token added

My application has a search functionality which uses a query param fullText for the search term. But on my QA server, any query parameters are being removed and csrf token is being added.
Example, on homepage, if I search for 'tax', the url should be:
https://www.qaserver.com/en/search.html?fullText=tax
Instead, it changes to below url and remains on the 'same' page it is on.
https://www.qaserver.com/en/home.html?%3Acq_csrf_token=eyJleHAiOjE1MDAyNDk5NzgsImlhdCI6MTUwMDI0OTM3OH0.EXoQy8xeVh3j9kdFdnenLGLl2sFEh_boi_jFareO1is
Is there any AEM/dispatcher config missing or incorrect ?
The dispatcher or AEM logs don't show who is appending this param or why.
The same thing happens with direct IP of publish server as well.
Include <cq:includeClientLib categories="granite.csrf.standalone"/> on the page from you are making POST ajax or form submit. This should resolve the issue.
Or the other option is to exclude particular servlet path from CSRF Filter Configuration (Which is not recommended).

Autocomplete testing on Azure Search explorer

I am trying to build and test the auto complete feature on a master item lookup tables using Azure Search (for a ASP MVC application). The search index was done with the suggesterName SG set to ItemDisplayName
I was looking to test it first on Azure portal- so that I could aim to replicate the results via code. This is because the results I am getting in code are quite unexpected
As I type the substring the itemDislayName, the expectation was that upto 5 selected names will be displayed
On the portal, I tried a query string of
search=str&suggesterName=SG
with the base request URL containing the index, api version and sugestorName-but I don't get results of items containing 'str' and with the fuzziness as below
Could you please guide around
[1] how I can get suggestor output in azure portal-search explorer
[2] can I control fuzziness using queryType and ~1,~2
I was referring to these 3 links
1) https://learn.microsoft.com/en-us/rest/api/searchservice/suggestions
and
2) https://channel9.msdn.com/Shows/Azure-Friday/Azure-Search-103-Azure-Search-Suggestions-with-Liam-Cavanagh
3) gunnarpeipman.com/2016/07/azure-search-suggesters/
Azure Search Portal doesn't support the Suggestion API yet. You will need to use an HTTP client like Fiddler or Postman.
Make sure you use the right URL for you Suggest requests:
https://[service name].search.windows.net/indexes/[index name]/docs/suggest
Please use our User Voice page to vote for adding the Suggest API to the Portal: https://feedback.azure.com/forums/263029-azure-search

Check JIRA REST API version?

How to check, that rest api is enabled in JIRA and it has appropriate version?
I know, that it is possible to request 'api/latest', but if latest installed version isn't compatible with methods, that i call?
To check that it is enabled, (and to disable it if you wish), then you will need to go to the Administration panel of your instance and enable/disable it there. Specifically you need to go to:
Administration > General Configuration > Set Accept remote API calls to either On/Off
To check if REST api is enabled, just go to (change the URL to your own)
https://jira.atlassian.com/rest/api/2/user
and see if the page loads.
I don't think there is a way using the API to get the API version, but you can make the API calls and fallback in case of an error. The coding depends on what you are trying to achieve.
You can find more info about the REST API at:
JIRA REST API Version 2 Tutorial
JIRA REST API documentation
If your stuck on the coding part, search Atlassian answers and SO or ask a question.
Use the /rest/serverInfo endpoint, e.g. /rest/api/2/serverInfo.
This should return a JSON string with JIRA version, e.g.
{
...
"version": "8.x.x",
...
}
View page source of Jira page and search version.
Sample output:
<meta name="application-name" content="JIRA" data-name="jira" data-version="7.9.2"><meta name="ajs-server-scheme" content="http">