[GeoNetwork-users] How to add a new criteria in search geonetwork 2.2.0

Hi,

I try to add a new criteria in simple search, I need to know what files must
modify. I've been searching on internet and modify the next files:

I've add to the lucene.xsl
    <!-- any 2 -->
    <xsl:call-template name="textField">
      <xsl:with-param name="expr" select="/request/any2"/>
      <xsl:with-param name="field" select="'any2'"/>
    </xsl:call-template>
in the searchform_simple_template.xsl
                                 <td>
          <xsl:value-of select="/root/gui/strings/searchQue"/>
        </td>
        <td class="padded" align="right">
          <input name="any2" id="any2" class="content" size="17"
            value="{/root/gui/searchDefaults/any2}"/>
          <br/>
        </td>
In the gn_search.xsl

function runSimpleSearch()
{
  preparePresent();

  var pars = "any=" + encodeURIComponent($('any') .value);
  pars+= "&any2=" + encodeURIComponent($('any2'.value));
  var region = $('region').value;
  if(region!="")
  {
    pars += "&"+im_mm_getURLselectedbbox();
    pars += fetchParam('relation');
    pars += "&attrset=geo";
        
    if(region!="userdefined")
    {
      pars += fetchParam('region');
    }
  }
  pars += fetchParam('sortBy');
  pars += fetchParam('hitsPerPage');
  pars += fetchParam('output');
  
  // Load results via AJAX
  gn_search(pars);
}
    
In the strings.xml
<any2>- Any2 -</any2>
<searchQue>Que es?</searchQue>
<que>que</que>

In the folder src/org/fao/geonet/services/util/MainUtil.java

.addContent(new Element(Geonet.SearchResult.ANY2) .setText(""))
Element elAny2 = elData.getChild(Geonet.SearchResult.ANY2);
String sAny2 = request.getChildText(Geonet.SearchResult.ANY2);
if (sAny2 != null) elAny2.setText(sAny2);

In the file src/org/fao/geonet/constants/Geonet.java

public static final String ANY2 = "any2";

Please Anybody can tell me what more i must modify

Thank you!!!
--
View this message in context: http://n2.nabble.com/How-to-add-a-new-criteria-in-search-geonetwork-2.2.0-tp2468681p2468681.html
Sent from the geonetwork-users mailing list archive at Nabble.com.