Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make search index compatible with Search 2.0
- Loading branch information
1 parent
3484b0d
commit 8414867
Showing
2 changed files
with
7 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,8 @@ | ||
{ | ||
"_id":"_design/lucene", | ||
"language":"java", | ||
"views" : | ||
{ | ||
"index" : { | ||
"map": { | ||
"classname": "com.cloudant.indexers.DefaultSearch" | ||
}, | ||
"reduce": "_count", | ||
"comment": "This indexes all json values in the document and places them in a single searchable field name all as well as their named field" | ||
"_id": "_design/lucene", | ||
"indexes": { | ||
"searchapp": { | ||
"index": "function(doc){\n for(var key in doc){\nif(doc.hasOwnProperty(key)){\nif(key[0] === \"_\") continue;\n index(\"all\", doc[key]);\n index(key, doc[key]);\n}\n}\n}" | ||
} | ||
} | ||
} |