RE: jahia search field

"BARREAU Amandine" <[email protected]>
Newsgroups gmane.comp.cms.jahia.template
Message-ID <7F2AAB834036BC48AB9C27DD9EC30BBE15E9E9@EPLUXSEX02.ep.parl.union.eu>
Yes I already tried this but no results.
Thanks


  _____  

	From: [email protected]
[mailto:[email protected]] 
	Sent: 23 November 2005 16:49
	To: [email protected]
	Subject: RE: jahia search field
	
	

	Have you already tried in a similar manner like you have done it
for the filename? 
	Like, for example 
	
	String doSearchOnDirectoryProjectName =
JahiaTools.getStrParameter(request,"doSearchOnDirectoryProjectName","");
	if( !"".equals(doSearchOnDirectoryProjectName)){
	if ( advOptions.length()>0 ) { 
	  advOptions.append(" AND "); 
	 }
	advOptions.append("(" +
JahiaSearchConstant.FIELD_FIELDNAME+":directoryProjectName)");
	} 
	else { 
	String doSearchOnDirectoryProjectDescription =
JahiaTools.getStrParameter(request,"doSearchOnDirectoryProjectDescriptio
n","");
	if( !"".equals(doSearchOnDirectoryProjectDescription)){
	if ( advOptions.length()>0 ) {
	 advOptions.append(" AND ");
	}
	 advOptions.append("(" +
JahiaSearchConstant.FIELD_FIELDNAME+":directoryProjectDescription)");
	} 
	} 
	
	Be aware also, that you can not perform a search on two fields
combined with AND clause simultaneously, i.e. search with options
'fieldname:directoryProjectName AND
fieldname:directoryProjectDescription' will bring no results. 
	
	I'm not sure if this helps 
	
	Kind reagards. 
	
	
	
	
"BARREAU Amandine" <[email protected]> 

23.11.2005 15:39 
Please respond to
<[email protected]>


To
<[email protected]> 
cc
Subject
RE: jahia search field

	




	I want to customize advanced search by adding other input. I
have already add input search on filename by adding: 
	  
	filename = JahiaTools.getStrParameter(request,"filename","");
	 if( !"".equals(filename)){
	  if ( advOptions.length()>0 ){
	   advOptions.append(" AND (");
	  } else {
	   advOptions.append("(");
	  }
	  advOptions.append(JahiaSearchConstant.FILE_NAME+":");
	  advOptions.append(filename);
	  advOptions.append(")");
	 
	 } 
	  
	I works fine 
	and now I want to add input serach on some custom fields like
'directoryProjectName' or 'directoryProjectDescription'. 
	  
	Thanks. 
	  
	  
  _____
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.