norch vue
Norch based
vue.js前端到搜索引擎诺奇 /搜索指数。从Norch开始并在没有太多编码的情况下测试您的数据集的一种简单方法。 (将在以后的时间点上没有任何编码)
npm install -g norch
npm install search-index-indexer norch-vuejs-app node node_modules/search-index-indexer/index.js -c https://cdn.rawgit.com/eklem/search-index-indexer/master/config.json -d https://cdn.rawgit.com/eklem/dataset-vinmonopolet/master/dataset-vinmonopolet-sparkling.str
mkdir norch-index
mv data/ norch-index/对于Test-DATA,我们使用数据集数据集Vinmonopolet。
norch -p 3030 -l silly -i norch-index Norch.js从定义数据模型开始。它的一部分是config-stuff。将其指向您的Norch实例的url ,并设置Cateories(您要过滤的字段)。
// Application configuration
config = {
'url' : 'http://[norch-url]:[port-number]/' ,
'endpoint' : {
'search' : 'search?q=' ,
'categorize' : 'categorize?q=' ,
'buckets' : 'buckets?q=' ,
'docCount' : 'docCount' ,
'totalHits' : 'totalHits?q='
} ,
'categories' : [ {
'field' : '[filed-to-categorize-on]'
} ]
}有关Norch端点API的更多信息。此应用仅支持一个子集。
我正在使用Apache交付页面,但这仅仅是我。用户您首选的Web服务器以提供index.html和norch.js,您就可以玩了。
Google Chrome是开发时首选的浏览器,因为它具有VUE的工作DevTool:vue.js devtools。它将在应用程序中向您展示数据对象发生的事情。
开发时,最好检查诺奇的支持,不支持什么,以及什么是响应。这样的浏览器测试:
http://[norch-url]:[port-number]/search? q ={ " pageSize " :10, " query " :{ " AND " :{ " * " :[ " * " ]}}}norch Json API交谈。与search-index-indexer一起,这将使人们能够在无需任何编码的情况下测试其数据集。 norch JSON API转换为内部search-index API。