Free Text Search

FreeTextSearch method is used to search random text on the indexed Resume or JD.

Note: To use FreeTextSearch method, the resume or JD must be indexed using parseAndIndex method with the indexDetailText parameter set as "true". By default, it is "false" in the parseAndIndex API parameter.

FreeTextSearch on the Resume: The FreeTextSearch method searches on the DetailResume entity that contains the resume details in the text format. To know more about the DetailResume entity, refer Resume Parser response and DetailResume in the resume parser schema.

FreeTextSearch on the JD: The FreeTextSearch method searches on the JobDescription entity that contains the JD details in the text format. To know more about the JobDescription entity, refer JD Parser response and JobDescription in the JD parser schema.

API URL

The Free Text Search API uses the below URL:

https://searchengine.rchilli.com/RChilliSearchEngineAPI/RChilli/freeTextSearch

API Endpoint

The Free Text Search API uses the below endpoint:

/freeTextSearch

API Method

The Free Text Search API uses the only POST method.

API Request Type

The Free Text Search API uses JSON request type.

API Request Headers

Header Data Type Description
Content-Type string Indicates the input type of the incoming request body. The only supported value is application/json.

API Request Parameters

The Free Text Search API requires the following parameters in the JSON request format:
Name Type Description Remarks
indexType String This is the type of the file, either Resume or JD Required
indexKey String Use your user key as shared by RChilli team Required
query Object This object contains the query details Required
keyword String This is the free text query that you want to search in the indexed documents. The keyword can contain a string along with the operators i.e. AND / OR / NOT etc. For more details, see Use of Boolean operator in the Keyword. Required
minScore Integer When minScore is passed, then only those documents are returned in the output whose score is equal to or more than the integer value passed in the minScore parameter. Optional
customValue Object When you pass custom values during indexing, you can search based on these custom values in the search engine. For more details, see Custom Value and Parse and Index. customValue
requiredCustomValues Boolean You can use either AND or OR boolean expression. This creates a condition between the parameters in the customValue and keyword entities.
  • AND: When AND operator is used, then all the parameters in the customValue object and all the entities in the keyword must be true to get the API response.
  • OR: When OR operator is used, then API will return the response if either customValue object or any entity in the keyword is true.
requiredCustomValues
showCustomValue Boolean This parameter when set to true then the matched customValue will be returned in the response. Optional
facet Object For more details on facets, click Facets Optional
sorting Object For more details on sorting, click Sorting Optional
filter Object For more details on filters, click Filter Optional
geoSearch Object For more details on geoSearch, click Geographical Search Optional
explainScore Boolean Default is false. If set true this returns details about how a document is searched. For more details, click Explain Score Optional
explainScoreType String Default is text. It can be set as JSON and work if ExplainScore is true. For more details, click Explain Score Optional
excludeDocumentIds Array Document Ids which you don't want to consider in search. For more details, refer Exclude Document ID. Optional
includeDocumentIds Array Document Ids which you want to consider in search. For more details, refer Include Document ID. Optional
pageSize Integer Number of records return in one API call:
  • Default 50
  • maximum 500

Contact support@rchilli.com to update the limit.

For more details, click Pagination.
Optional
pageStart Integer Start index of record to return. Can be used for paging when multiple record are searched. Default is 0. For more details, click Pagination Optional
fieldList String The fieldLists parameter is used in the Search and Match API request to customize the fields (entities) in the API response. For more details, refer Field Lists. Optional

API Response Parameters

The Free Text Search API response parameters are as follows:
Name Type Description
count String This is the total number of documents that have the query (keyword) string that is passed in the API request
pageStart Integer Start index of record to return. Can be used for paging when multiple record are searched. Default is 0. For more details, click Pagination
pageSize Integer Number of records return in one API call:
  • Default 50
  • maximum 500

Contact support@rchilli.com to update the limit.

For more details, click Pagination.
records Object This object contains details of all the records (documents) that matches with the query

Use of Boolean operator in the Keyword

In the FreeTextSearch API request, you can pass the keyword with the query string along with the regular expressions and the operators, i.e., AND / OR / NOT, etc. See the following example on the use of the regular expressions and the operators in the keyword:
Note: The Boolean operator passing in the request must be in the capital case.

  1. Using regular expression (.*?) in the keyword

    A regular expression is a pattern that the regular expression engine attempts to match in the input text. A pattern consists of one or more character literals, operators, or constructs. For a brief introduction, see Regular Expressions. The regular expression (.*?), when passed in the FreeTextSearch API request, then it matches as little as it can to make a match, and the parenthesis makes it a capture group as well. For example, the below keyword will match candidate profiles that name ends with developer, such as Java developer, Senior developer, php developer, etc.

    "keyword": "(.*?)developer"
  2. Using scoring in the keyword

    When the score is passed in the FreeTextSearch API request along with the search keyword, the API return the record with the score. For example, in the below keyword,  

    "keyword": "(communication)^=50 OR \"Problem Solving\"^=30"
    • if only the "communication" word matches in the profile, then the profile will be displayed with a score as 50
    • if only "Problem Solving" word matches in the profile, then the profile will be displayed with a score as 30
    • if both word "communication" and "Problem Solving" matches in the profile, then the profile will be displayed with a score as 80
  3. Using boolean operators in the keyword

    You can pass the boolean operator in the FreeTextSearch API request such as AND, OR, and NOT. You can also pass the symbol of the boolean operator such as && (AND), || (OR), and ! (NOT). See the following example of how to use the boolean operator in the keyword:

    1. Use of AND / && in the keyword

      When AND operator or && symbol is used in the keyword, then both the condition must be true to get the result. For example, in the below keyword, the FreeTextSearch API will return the profile only when the profile contains Java and php, both word in the document.

      "keyword": "Java AND php"
      "keyword": "Java && php"
    2. Use of OR / || in the keyword

      When OR operator or || symbol is used in the keyword, then either of the condition must be true to get the result. For example, in the below keyword, the FreeTextSearch API will return the profile only when the profile contains either Java or php words in the document.

      "keyword": "Java OR php"
      "keyword": "Java || php"
    3. Use of NOT / ! in the keyword

      When NOT operator or ! symbol is used in the keyword, then the given condition must not be true to get the result. For example, in the below keyword, the FreeTextSearch API will return the profile only when the profile contains either Java or Spring word in the document and must not contains the php word in the document.

       "keyword": "(Java || Spring) NOT JSP"
      
       "keyword": "(Java || Spring) !JSP"
      
    See the following table for the regular expressions and the boolean operator uses in the FreeTextSearch API request keyword parameter:
    Sr. No. Operator Operator Symbol Description Example 1 Example 2
    1 AND && Requires both words on either side of the Boolean operator to be present for a match. "Java AND PHP" "Java && PHP"
    2 OR || Requires that either word (or both words) be present for a match. "Java OR PHP" "Java || PHP"
    3 NOT ! Requires that the following word not be present. (you can use NOT operator with AND/OR Operator) "(Java OR PHP) NOT JSP" "(Java || PHP) !JSP"
    4 "" Searching complete word along with single word "Java OR \"Communication Skill\"" "MySQL OR \"Communication Skill\""
    5 ~ Searching keywords nearby the defined range like "IT Contractor"~10 i.e., IT word should be in range of 10 words from Contractor word. For example, in the below string, contractor is four words away from IT word.

    "IT and network support engineer contractor"

    "\"Senior Developer\"~10 "\"IT Contractor\"~10"
    6 () Grouping the keyword using AND, OR, and NOT operators "(Java OR PHP) NOT JSP" "(Spring AND PHP) NOT JSP"
    7 (.*?) Regular Expression (partial match) “(.*?) Developer” “(.*?) Manager”

JSON Request For Free Text Search - Resume

{
    "index": {
        "indexType": "Resume",
        "indexKey": "Use your userkey"
    },
    "query": {
        "keyword": "Cardiologist && (Mohali || Chicago)"
    },
    "pageSize": 10,
    "pageStart": 0
}

JSON Response For Free Text Search - Resume

{
    "count": 1,
    "pageStart": 0,
    "pageSize": 10,
    "records": [
        {
            "id": "12345663456",
            "CurrentEmployer": "Henry Ford Hospital",
            "TotalExperienceInYear": 12.0,
            "CurrentJobProfile": "Cardiologist",
            "State": "IL",
            "FullName": "John Paul Deo",
            "Country": "USA",
            "City": "Chicago"
        }
    ]
}

JSON Request For Free Text Search - JD

{
  "index": {
    "indexType": "JD",
    "indexKey": "Use your userkey"
  },
  "query": {
    "keyword": "Tutor AND (USA OR CA)"
  },
  "pageSize": 10,
  "pageStart": 0
}

JSON Response For Free Text Search - JD

{
    "count": 1,
    "pageStart": 0,
    "pageSize": 10,
    "records": [
        {
            "id": "12345663456",
            "JobProfile": "Tutor",
            "Degree": [
                "Doctor of Medicine",
                "Bachelor of Science",
                "Secondary Education"
            ],
            "Employer": "LinkedIn",
            "City": "Detroit",
            "Country": "USA",
            "State": "MI"
        }
    ]
}