Add a new page to be indexed maunaly via api


(Elitzur E) #1

Hello.
i am trying to use swiftype web search that already crawled my site and manualy add a page. when trying to add content like this:
{
"auth_token": "________",
"document": {
"external_id": "2",
"fields": [
{"title": "title", "body": "viper123", "type": "string"}
]}
}
i get:
"error": "This API action is prohibited on Engines created using the Swiftype web crawler."

why is that?

thanks


(Kellen Evan) #2

Hello!

Thank you very much for posting -- we have recently opened this forum, so it's great to see thoughts arrive.

We have two Engine types: an API based Engine and a Crawler based Engine. Crawler based Engines use the crawler to ingest and index documents. API based Engines use the API for ingestion and indexing.

You can read more about the differences within the API Overview: https://swiftype.com/documentation/site-search/overview#engine_types.

Let me know if you have anymore questions!

Kellen


(Elitzur E) #3

Hi. yea just found that post... site needs to be a bit cleaner :P.

Endpoint Supported Engines
Document Indexing API-based Engine only.
Crawler Operations Crawler-based Engine only.
Engines Account level.
Search Both.
Autocomplete Both.
Analytics Both.

bummer...
what i was wondering if its possible to have CMS like umbraco publish to the index while having the Crawler-based Engine working...


(Mike Wong) #4

What you could potentially do instead of attempting to push raw JSON is write a function that hits the crawl_url endpoint with the published content URL to (re)visit whenever a page is added, updated, or deleted.

That way you can keep your search engine index fresh prior to the next full recrawl process: https://swiftype.com/documentation/site-search/api-crawler-operations#crawl-url


(Elitzur E) #5

COOL. ill try that.
thanks


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.