Sundar, The simplest approach would be to configure fields in your database. This will allow you to associate multiple element or element/attribute names to a single name structure like "title" or "body". Each element can contribute a weighting which is applied at the time of indexing. If you have already existing database with content then you will have to pay the cost of reindexing the content to add the field indexes.
More information on fields http://docs.marklogic.com/guide/admin/fields#chapter you can then use a field constraint in your search:search options to define the fields. Date: Wed, 20 Nov 2013 12:55:25 +0000 From: "Sundaravadivel Kandasamy" <[email protected]> Subject: [MarkLogic Dev General] weightage in xml tags for search To: "[email protected]" <[email protected]> Message-ID: <5FB7D0B311DDFE439CD54FA60898F802122FC0F2@chnshlmbx14> Content-Type: text/plain; charset="us-ascii" Hi, I want to set the weightage for 'body' and 'title' element in xml, xml content will have other elements than body and title. I am using search API for search. I am using search API for search and we have five different xml contents with different namespaces for title and body element. Is there any good approach to achieve this weightage? cts:element-word-query to set the weightage may not help. Thanks. Regards, Sundar. _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
