NOTICE: Branded Content
NOTICE: Certain versions of content (“Material”) accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.
IDOL User Discussions
cancel

Indexing a web service rest with IDOL

SOLVED
Go to solution
Highlighted
ChrisSG Contributor.
Contributor.

Indexing a web service rest with IDOL

Hi,

 

I am a beginner with IDOL.

I need to index a service rest (json) with IDOL v11. what is the best connetor to use. I tried with the httpConnector, but I can not get the json in the IDOL document. have an example of config to index from json ?

thanks.

regards.

chris

1 ACCEPTED SOLUTION

Accepted Solutions
Micro Focus Frequent Contributor Tomasenc Micro Focus Frequent Contributor
Micro Focus Frequent Contributor
Solution

Re: Indexing a web service rest with IDOL

Hello ChrisSG,

I belive that you can use WebConnector or HttpConnector due to the request is via http request.

Then, to split the json files on different documents, you need to set the CFS with TextToDocs or a lua scritp in order to, specify how to handle that files.

If you require further assistance, please feel free to open a ticket on the software support portal.

Kindly regards.

tomasenc
5 REPLIES
Micro Focus Frequent Contributor Tomasenc Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: Indexing a web service rest with IDOL

Hello ChrisSG,

Thanks for contacting Micro Focus SW community,

Could you please confirm the following:

  1. Are you trying to index a .json file?
  2. Is the file in your local system or network location (Like share folder or Internet)?

Regards.

tomasenc
Micro Focus Frequent Contributor Tomasenc Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: Indexing a web service rest with IDOL

Hello ChrisSG,

I would like to know if you had a chance to check my last reply?

Please remember that a if the files is located in a network place or in the physical location you can use the FilesSystem Connector.

I mean, if the files are on "\\ServerName\ArchiveDocuments\testFile.json" or "C:\ArchiveDocuments\testFile.json" the FileSystem Connector is a good idea. However, if the files is on a web page you can use WebConnector or HTTPConnector.

Please let me know if you have any other question or if you need any further assistance.
 
Kindly regards.
tomasenc
ChrisSG Contributor.
Contributor.

Re: Indexing a web service rest with IDOL

Hello Tomasenc,

Thank you for your answer. My JSON file is available through an HTTP request. My file consists of a list of IDs/names that I would like to index by creating a DREREFERENCE by ID.

Here's a part of my JSON :

[{"id":285,"actif":1,"critique":0,"device":"desktop","informationMessage":null,"marche":"particuliers professionnels entreprises","name":"Archivage","recherche":"archives clients comptabilité","shortname":"Archivage","trigramme":"ARC","typeAppli":"Psystem","url":null,"utilisateur":"agence  fonctionnel","categories":[{"id":2,"name":"données clients"}]},{"id":286,"actif":1,"critique":0,"device":"desktop","informationMessage":null,"marche":"particuliers professionnels entreprises","name":"Arrêtés de compte","recherche":"arrêtés  agios  intérêts  ","shortname":"Arrêtés de compte","trigramme":"ARR","typeAppli":"Psystem","url":null,"utilisateur":"agence  fonctionnel","categories":[{"id":2,"name":"données clients"}]}]

I would want 2 documents :

DREREFERENCE="id=285" DRETITLE=Archivavge DEVICE=desktop ....

DREREFERENCE="id=286" DRETITLE=arrêté de compte DEVICE=desktop ....

Is that possible? How to do it?

thanks

best regards

Christophe.

 

 

Micro Focus Frequent Contributor Tomasenc Micro Focus Frequent Contributor
Micro Focus Frequent Contributor
Solution

Re: Indexing a web service rest with IDOL

Hello ChrisSG,

I belive that you can use WebConnector or HttpConnector due to the request is via http request.

Then, to split the json files on different documents, you need to set the CFS with TextToDocs or a lua scritp in order to, specify how to handle that files.

If you require further assistance, please feel free to open a ticket on the software support portal.

Kindly regards.

tomasenc
kstoltz
New Member

Re: Indexing a web service rest with IDOL

The HTTP Connector and Web Connector may work for simple REST APIs where the parameters are static, but both are built for spidering web sites and following URLs. They don't really have the capability for the developer to modify parameter values in order to iterate through a result set from a web service.

Your best bet is the Social Media Feed Connector. The Social media feed connector works by calling the various web service APIs of sites like Facebook, Twitter, and the like, but it's really the connector itself is really a framework where a developer can call any REST API that returns XML or JSON.

The limitation to the Social Media Feed Connector is if the web service is protected in some way by OAuth or other form of authentication. The out of the box authorization dlls are designed specifically for the various social media sites, so they won't work when re-used for a custom web service. In that case, you might need to create a proxy service or you will have to look at the Java Connector libraries.