My document structure is something like this,I want to perform FTS on pageContent,
{
“_type”: “Book”,
“title”: “2222”,
“comment”: “”,
“pages”: [{
“pageNo”: “1”,
“pageContent”: “First grade English”
}, {
“pageNo”: “2”,
“pageContent”: “Today is holiday”
}, {
“pageNo”: “3”,
“pageContent”: “In fifth grade math students predict the relative size of solutions in addition, subtraction, multiplication, and division of whole numbers, addition, subtraction, and multiplication of fractions, decimals, and mixed numbers.”
}]
}
Below is my FTS index definition,
{
“type”: “fulltext-index”,
“name”: “sbook-test”,
“uuid”: “4b3dd2c54599aca7”,
“sourceType”: “couchbase”,
“sourceName”: “content”,
“sourceUUID”: “38b1bf06c557d262b3b8df46ba6c5f46”,
“planParams”: {
“maxPartitionsPerPIndex”: 171
},
“params”: {
“doc_config”: {
“docid_prefix_delim”: “”,
“docid_regexp”: “”,
“mode”: “type_field”,
“type_field”: “_type”
},
“mapping”: {
“analysis”: {},
“default_analyzer”: “standard”,
“default_datetime_parser”: “dateTimeOptional”,
“default_field”: “_all”,
“default_mapping”: {
“default_analyzer”: “”,
“dynamic”: true,
“enabled”: false
},
“default_type”: “_default”,
“docvalues_dynamic”: true,
“index_dynamic”: true,
“store_dynamic”: false,
“type_field”: “_type”,
“types”: {
“SBookPublish”: {
“default_analyzer”: “”,
“dynamic”: false,
“enabled”: true,
“properties”: {
“pages”: {
“default_analyzer”: “”,
“dynamic”: true,
“enabled”: true,
“properties”: {
“pageContent”: {
“default_analyzer”: “”,
“dynamic”: false,
“enabled”: true,
“fields”: [
{
“include_in_all”: true,
“include_term_vectors”: true,
“index”: true,
“name”: “pageContent”,
“store”: true,
“type”: “text”
}
]
},
“pageNo”: {
“default_analyzer”: “”,
“dynamic”: false,
“enabled”: true,
“fields”: [
{
“include_term_vectors”: true,
“index”: true,
“name”: “pageNo”,
“store”: true,
“type”: “text”
}
]
}
}
}
}
}
}
},
“store”: {
“indexType”: “upside_down”,
“kvStoreName”: “mossStore”
}
},
“sourceParams”: {}
}
If I run this,
I want to get only searched pages.pageNo but here I am getting all pageNo’s.
I need output something like, page 2 and 3 should not come in result set.
Actually pageNo 2 and 3 doesn’t have searched term(It is concatenating pages.pageNo).
If you see document only 1 st page object is having search term English.
Can anyone suggest me something ?