views:

36

answers:

0

Hellos, I am trying to filter results from a search against Solr depending on a field.
I was usiing this piece of code in page.xhtml:

<h:selectOneMenu id="lang" binding="#{myBean.myMenu}" onchange="javascript:refreshResults(); return false;" >
                            <f:selectItem itemValue="" itemLabel="Language" />
                                        <f:selectItems value="#{myBean.myMenu}" />
                                </h:selectOneMenu>  

in schema.xml, I have this field:

<field name="field" type="selectFilter" indexed="true" stored="true" required="true" multiValued="false" elementForm="SELECTONEMENU" fieldSchema="field.xml" />  

field type selectFilter:

<fieldType name="selectFilter" class="solr.TextField" positionIncrementGap="100">
    <field name="text" type="type" indexed="true" stored="true" termVectors="true" termPositions="true" termOffsets="true" elementForm="INPUTTEXT" omitNorms="true"/>   
  <field name="field" type="selectFilter" indexed="true" stored="true" required="true" multiValued="false" elementForm="SELECTONEMENU" fieldSchema="field.xml" />
              <analyzer >
                        <tokenizer class="solr.KeywordTokenizerFactory"/>
                        <filter class="solr.TrimFilterFactory" />
                        <filter class="solr.ISOLatin1AccentFilterFactory"/>
                        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="0" catenateNumbers="0" catenateAll="1" splitOnCaseChange="0"/>
      </analyzer>

    </fieldType>

field.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<cs:selectOneSchema xmlns:cs="http://www.ximetrix.com/SelectOneSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.ximetrix.com/SelectOneSchema SelectOneSchema.xsd "
    selectOneName="medios">

    <cs:item itemName="field" itemLongName="Field" />   
    <cs:item itemName="name1" itemLongName="name1" />
    <cs:item itemName="name2" itemLongName="name2" />
    <cs:item itemName="name3" itemLongName="name3" />

</cs:selectOneSchema>   

I edit my question, because the one before was a backend problem. But now, with the same configuration, my problem is that I get this query:

q=%2B%28text%3A%28concept%29%29&facet.field=field&facet=true

And when I really want this one

q=%2B%28text%3A%28concept%29%29&facet.field=field&facet=true&fq=field:value

I don't execute any query while clicking in one of the options. The result, I am not filtering my results, Any help? Thanks in advance