Thanks!
 
I will try this the next day I am in the office.
 
 
Best regards
 
Wolfram

________________________________

Von: Khue Nguyen [mailto:[EMAIL PROTECTED]
Gesendet: Fr 13.08.2004 16:22
An: [EMAIL PROTECTED]
Betreff: Re: Limiting people search



Hi,

you can limit search on specific fields this way :


 String searchQuery =
request.getParameter(JahiaSearchConstant.CLIST_SEARCHQUERY_INPUT_PREFIX +
"directoryPeopleContainer");
 if (searchQuery != null && !"".equals(searchQuery.trim()) ){
    // track field on which you want to limit search
    String fieldToSearchInMyContainer =
request.getParameter("fieldToSearchInMyContainer"); // must be added in your
search form.
    if ( fieldToSearchInMyContainer != null ) {
       searchQuery +=  " AND fieldname:" + fieldToSearchInMyContainer;
    }
    ContainerSearcher cSearcher =
     new ContainerSearcher("directoryPeopleContainer",jParams,
      searchQuery,jParams.getEntryLoadRequest());

request.setAttribute("directoryPeopleContainer_search_handler",cSearcher);
 }

There are more information at http://list.jahia.org/dev_list/msg01338.html.


Regards,
Khue Nguyen


----- Original Message -----
From: "Wolfram Sorg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 13, 2004 10:16 AM
Subject: Limiting people search


Hi,

is there a way of limiting the search of lucene not only to a certain
container but specific information inside of it?

The peoples template has a search functionality that does only search
within the people container. In fact every field of a person is searched
so if I enter a name and that name is part of a street of another contact
I will get this result as well.

What we want to do is to limit the search to a single field (the name).
Filters are not working here, due to their lack of a "like" support. Filters
only allow to have 100% matches, >=, >, <= and <. None of these
work if we are looking for parts of a name.

Any suggestions?


Wolfram




<<winmail.dat>>

Reply via email to