Custom Value

Custom Value helps to index documents with the custom values.

Note: If resume or JD do not have the value you want to search, then those values can be sent as the custom values during indexing the document.

Once custom values are indexed, you can search based on these custom values in the search engine.

The Custom value is an optional parameter (query) that can be passed in the API request of Parse and Index, Simple Search, Boolean Search, Match, Match with ID, Match with Multiple Sub-User Ids, and One To One Match.

The following sections describe how to search documents into the search engine with custom values:

Custom Value Parameters

Follow below table on the Custom Value Parameters:
Name Type Description Remarks
customValue Object When you pass custom values during indexing then you can search based on these custom values in the search engine. For more details, see Parse and Index. Optional
multiFieldOperator String You can use either AND or OR boolean expression. This creates a condition between the parameters in the customValue object.
  • AND: When AND operator is used then all the parameters in the customValue object must be true.
  • OR: When OR operator is used then atleast one parameters within the customValue object must be true.
Optional
requiredCustomValues Boolean You can use either AND or OR boolean expression. This creates a condition between the parameters in the customValue and match object.
  • AND: When AND operator is used then all the parameters in the customValue object and match object 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 match object is true.
Optional
customValueWeightage Array If you want to assign weightage to custom values, you must pass the customValueWeightage parameter to dynamically set the weightage for those values. For more details, refer customValueWeightage Parameter in the API request Optional
showCustomValue Boolean This parameter when true then the matched customValue will be returned in the response. 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
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

Custom Value parameter in Parse and Index

Note: Refer Parse and Index to know full details.

    "customValue": {
        "customField1": "Value 1",
        "customField2": [
            "Value 2"
        ],
        "customField3": [
            {
                "docField1": "doc field value 1",
                "docField2": [
                    "value 1",
                    "value 2"
                ]
            }
        ],
       },
     

Custom Value parameter in Simple Search


    "customValue": {
        "customField1": "Value 1",
        "customField2": [
            "Value 2"
        ],
        "customField3": [
            {
                "docField1": "doc field value 1",
                "docField2": [
                    "value 1",
                    "value 2"
                ]
            }
        ],
        "multiFieldOperator": "AND/OR"
    },
    "showCustomValue": true/false,
    

Custom Value parameter in Boolean Search


    "customValue": {
        "customField1": "Value 1",
        "customField2": [
            "Value 2"
        ],
        "customField3": [
            {
                "docField1": "doc field value 1",
                "docField2": [
                    "value 1",
                    "value 2"
                ]
            }
        ],
        "multiFieldOperator": "AND/OR"
    },
    "showCustomValue": true/false,
    

Custom Value parameter in Match

{
    "index": {
        "indexType": "This is either Resume or JD",
        "indexKey": "your_user_key"
    },
    "match": {
        "docType": "JD/Resume",
        "jsonData": "json data in base64"
    },
    "customValue": {
        "customField1": "Value 1",
        "customField2": [
            "Value 2"
        ],
        "customField3": [
            {
                "docField1": "doc field value 1",
                "docField2": [
                    "value 1",
                    "value 2"
                ]
            }
        ],
        "multiFieldOperator": "AND/OR"
    },
    "requiredCustomValues": true/false,
    "showCustomValue": true/false,
    "pageSize": 10,
    "pageStart": 0,
    "explainScore": true,
    "explainScoreType": "json"
}

Custom Value parameter in Match with ID

{
    "index": {
        "indexType": "Resume/JD",
        "indexKey": "Your_user_key"
    },
    "match": {
        "docType": "JD/Resume",
        "jsonData": "json data in base64",
        "matchId": [
            "200004442229"
        ]
    },
    "customValue": {
        "customField1": "Value 1",
        "customField2": [
            "Value 2"
        ],
        "customField3": [
            {
                "docField1": "doc field value 1",
                "docField2": [
                    "value 1",
                    "value 2"
                ]
            }
        ],
        "multiFieldOperator": "AND/OR"
    },
    "requiredCustomValues": true/false,
    "showCustomValue": true/false,
    "pageSize": 10,
    "pageStart": 0,
    "explainScore": true,
    "explainScoreType": "json"
}

Custom Value parameter in Match with Multiple sub-user ID

{
    "index": {
        "indexType": "Resume/JD",
        "indexKey": "your_user_key",
        "subUserId": [
            "subUserid1",
            "subUserid2"
        ]
    },
    "match": {
        "docType": "JD",
        "jsonData": "json data in base64"
    },
    "customValue": {
        "customField1": "Value 1",
        "customField2": [
            "Value 2"
        ],
        "customField3": [
            {
                "docField1": "doc field value 1",
                "docField2": [
                    "value 1",
                    "value 2"
                ]
            }
        ],
        "multiFieldOperator": "AND/OR"
    },
    "requiredCustomValues": true/false,
    "showCustomValue": true/false,
    "pageSize": 10,
    "pageStart": 0,
    "explainScore": true,
    "explainScoreType": "json"
}

Custom Value parameter in One to One Match

{
    "index": {
        "indexKey": "your_user_key"
    },
    "match": {
        "resumeContent": "Resume content in base64",
        "resumeFileName": "sample.doc",
        "jdContent": "JD content in base64",
        "jdFileName": "JD sample.txt"
    },
    "resumeCustomValue": {
        "customField1": "Value 1",
        "customField3": "Value 3",
        "multiFieldOperator": "AND/OR"
    },
    "jdCustomValue": {
        "customField1": "Value 1",
        "customField3": "Value 3",
        "multiFieldOperator": "AND/OR"
    },
    "requiredCustomValues": true/false,
    "matchType": "JD to Resume/Resume to JD",
    "explainScore": true,
    "explainScoreType": "json"
}

customValueWeightage Parameter in the API request

If you want to assign weightage to custom values you passed in the API request then you must pass the customValueWeightage parameter to dynamically set the weightage for those custom values.
Note:

The customValueWeightage is an optional parameter (query) that can be passed in the API request of Simple Search, Boolean Search, Match, Match with ID, Match with Multiple Sub-User Ids, and One To One Match.

Sample request with customValueWeightage parameter
Note: The below request is the sample request for Simple Search, similarly you can pass the customValueWeightage parameter in the API request of Boolean Search, Match, Match with ID, Match with Multiple Sub-User Ids, and One To One Match.
{
    "index": {
        "indexType": "Resume",
        "indexKey": "your index key",
        "subUserId": "your subuser id"
    },
    "query": {
        "keyword": "Software Developer having 4 years of experience in Hibernate"
    },
    "pageSize": 1,
    "pageStart": 0,
    "explainScore": true,
    "explainScoreType": "json",
    "showCustomValue": true,
    "requiredCustomValues": true,
    "customValue": {
        "Shift": "A Shift",
        "customField3": [
            {
                "Job": [
                    "PT"
                ],
                "Sports": [
                    "Ludo",
                    "Tennis"
                ]
            }
        ]
    },
    "customValueWeightage": {
        "weight": 30,
        "child": [
            {
                "field": "Shift",
                "weight": 20
            },
            {
                "field": "customField3.Job",
                "weight": 40
            },
            {
                "field": "customField3.Sports",
                "weight": 80
            }
        ]
    }
}
Sample output with customValueWeightage parameter in the API request
Note: The below outpur is the sample output for Simple Search, similarly you get the output for Boolean Search, Match, Match with ID, Match with Multiple Sub-User Ids, and One To One Match.
{
    "count": 1,
    "pageStart": 0,
    "pageSize": 1,
    "records": [
        {
            "id": "1qwe423rd",
            "customField3.Job": [
                "PT"
            ],
            "customField3.Sports": [
                "Cricket",
                "Kabadi",
                "Tennis"
            ],
            "score": 95.71,
            "CurrentEmployer": "Sanovi Technologies",
            "TotalExperienceInYear": 10.1,
            "Shift": "C Shift",
            "CurrentJobProfile": "Software Engineer",
            "FullName": "Ajay kumar",
            "SubUserId": "testl"
        }
    ],
    "explainScore": [
        {
            "id": "1qwe423rd",
            "explaination": {
                "score": 95.71,
                "maxScore": 100.0,
                "SimpleSearch": {
                    "score": 70.0,
                    "maxScore": 70.0,
                    "detailScore": [
                        {
                            "score": 40.83,
                            "maxScore": 40.83,
                            "entity": "CurrentJobAlias",
                            "value": "software developer"
                        },
                        {
                            "score": 17.5,
                            "maxScore": 17.5,
                            "entity": "SkillHaveExp",
                            "value": "hibernate"
                        },
                        {
                            "score": 11.67,
                            "maxScore": 11.67,
                            "entity": "TotalExperienceInYear",
                            "value": "[4.0 TO Infinity]"
                        }
                    ]
                },
                "customValue": {
                    "score": 25.71,
                    "maxScore": 30.0,
                    "detailScore": [
                        {
                            "score": 8.57,
                            "maxScore": 8.57,
                            "entity": "customField3.Job",
                            "value": "pt"
                        },
                        {
                            "score": 17.14,
                            "maxScore": 17.14,
                            "entity": "customField3.Sports",
                            "value": "ludo OR tennis"
                        },
                        {
                            "score": 0.0,
                            "maxScore": 4.29,
                            "entity": "Shift",
                            "value": "A Shift"
                        }
                    ]
                }
            }
        }
    ]
}
Note:
  • If the customValueWeightage parameter is not provided in the request, the default functionality of the CustomValue feature will be applied as a filter.
  • When both customValueWeightage and the GeoLocation feature are included in the request, the combined weightage will not exceed 100, with the following combinations:
    • Search/Match + GeoLocation + CustomValueWeightage = 100

    • Search/Match + CustomValueWeightage = 100

  • The GeoLocation feature takes priority over the customValueWeightage feature.
  • If the customValueWeightage is used, it will be returned as a separate node in the API response.