Permalink
Browse files

remover redundant namespace lookup logic

  • Loading branch information...
1 parent 8fc0275 commit 2991162cc70037e65c2c4601065af1825f5fd41b Peter Kim committed Aug 28, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/_framework/base/base-model.xqy
@@ -480,13 +480,12 @@ as element(search:options)
{
let $properties := $domain-model//(domain:element|domain:attribute)[domain:navigation/@searchable = ('true')]
-let $modelNamespace := domain:get-field-namespace($domain-model)
let $nav := $domain-model/domain:navigation
let $constraints :=
for $prop in $properties
let $type := ($prop/domain:navigation/@search-type,"value")[1]
- let $ns := ($prop/@namespace,$prop/ancestor::domain:model/@namespace, $modelNamespace)[1]
+ let $ns := domain:get-field-namespace($prop)
return
<search:constraint name="{$prop/@name}">{
element { fn:QName("http://marklogic.com/appservices/search",$type) } {
@@ -512,7 +511,7 @@ let $constraints :=
let $sortOptions :=
for $prop in $properties
- let $ns := ($prop/@namespace,$prop/ancestor::domain:model/@namespace, $modelNamespace)[1]
+ let $ns := domain:get-field-namespace($prop)
return
( <search:state name="{$prop/@name}">
<search:sort-order direction="ascending" type="{$prop/@type}" collation="{$COLLATION}">

0 comments on commit 2991162

Please sign in to comment.