Please provide your NXQL request that fails to return documents.
Also please check the DEBUG logs for information about the processing of that request.

Florent

On 15 Oct 2007, at 10:28, [EMAIL PROTECTED] wrote:

Hello,

I have a schema called "faq" with a "duree" field :
<xs:element name="duree" type="xs:integer"/>

I have another schema called "faqsearch" :
<xs:element name="dureemax" type="xs:integer"/>

In a types-contrib.xml, I have :
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="schema">
  <schema name="faq" src="schemas/faq.xsd" prefix="fq"/>
<schema name="faqsearch" src="schemas/faqsearch.xsd" prefix="fqsearch"/>
</extension>

and this FAQ document type :
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
  <doctype name="FAQ" extends="Document">
    <schema name="common"/>
    <schema name="dublincore"/>
    <schema name="faq"/>
  </doctype>

  <doctype name="AdvancedSearchCustom" extends="Document">
   <schema name="advanced_search" />
   <schema name="faqsearch" />
  </doctype>
</extension>

I indexed all fields with a nxsearch-contrib.xml file.

I made a converter in an nxdocument.cpm.xml :
<resource-property name="fq:duree" converter="int" store="yes"
index="un_tokenized" />

In a query-model.xml, I have :
<queryModel name="ADVANCED_SEARCH" docType="AdvancedSearchCustom">
...
<predicate parameter="fq:duree" operator="BETWEEN">
  <field schema="faqsearch" name="dureemin" />
  <field schema="faqsearch" name="dureemax" />
</predicate>
...

To finish, I modified the search_simpleform.xhtml with
<t:inputText value="#{doc.faqsearch.dureemin}" styleClass="dataInput" /> <t:inputText value="#{doc.faqsearch.dureemax}" styleClass="dataInput" />


When I made a search
SELECT * FROM Document WHERE fq:duree = '3' returns the document but if I
entered an interval with the 2 text fields, there is no answer.

Thank you.

Fabien

_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm


--
Florent Guillaume, Director of R&D, Nuxeo
Open Source Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87



_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to