eZ Community » Forums » Extensions » Ezfind - Startswith letter
expandshrink

Ezfind - Startswith letter

Ezfind - Startswith letter

Thursday 09 June 2011 9:50:10 am - 3 replies

Hi.

I need to create a filter which allows me to only list people that starts with a certain letter.

Basicaly it suppose to be a alphabetical listing of all people.

Any examples of an ezfind filter which can do this? is there an ezfind operator such as startsWith ?

Thursday 09 June 2011 10:09:09 am

Hi. You can use wildcards for that. something like

class/name:a*  should to the trick.

note that wildcards can only be used for start with searches, and not for end with searches.

Thursday 09 June 2011 10:50:27 am

Thanks.

This does however show results where one of the words starts with the letter.

Is there a way to restrict the query to only query items where the name starts with a.

If i search for class/name:a* it will return both john aldridge and adrian peters.

I would like only adrian peters to be returned.

Thursday 09 June 2011 11:05:47 am

i would try attr_name_s:a* then. 

actually what you are doing at the end is attr_name_t:a*, ezfind converts class/name to attr_name_t and that is sent to solr. 

 

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from