How to build a simple search application in Marklogic?

旧城冷巷雨未停 提交于 2019-12-01 21:18:40
grtjn

I suggest you take a look at the search:search functionality. It provides pagination, and faceted searching out of the box. You don't need three search boxes either, you can write fielded search queries using prefixes. Something like this:

fulltextterm first:name last:name address:city

You can even use braces, AND, OR, and NOT in that expression.

More about the Search API can be found in the Search Dev guide:

http://docs.marklogic.com/guide/search-dev

The function reference is probably useful too:

http://docs.marklogic.com/search

And for the sake of completeness the REST-API is worth mentioning too:

http://docs.marklogic.com/REST/client/search

HTH!

And, past the search and xquery knowledge, you can take a look at Roxy, which will set up a simple App-Builder style MVC application in xquery, sort of like Ruby on Rails.

I also recommend that you read some fo the tutorials at http://developer.marklogic.com/learn/tutorials. In particular I recommend you read the two part series starting with http://developer.marklogic.com/learn/get-started-apps. That will show you the basics for writing an application in MarkLogic. From there you can apply the search:search functionality mentioned by grtjn.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!