Searching the "Keywords" field

Discussion space for community admins

Moderators: hugo, alexandre, rmvanarkel

Post Reply
kellmck
Posts: 5
Joined: Tue Feb 10, 2015 3:10 pm

Searching the "Keywords" field

Post by kellmck » Tue Feb 10, 2015 5:32 pm

Can someone tell me how the "Keywords" field in the "Users" and "Marketplace" areas works for Users? What fields are searched when a word is typed in there? What are the rules governing matches (partial words? full words only?)?

Thanks!

luis
Posts: 182
Joined: Fri Feb 17, 2006 11:01 am

Re: Searching the "Keywords" field

Post by luis » Mon Mar 16, 2015 10:03 am

We use PostgreSQL's full text search for the users and ads search, however, with an user friendly query syntax.
PostgreSQL's native query syntax requires connectors between words, and is very strict. For example: "car london" is translated to "car | london".

The full text process has 2 steps, which use a dictionary matching the language set in the Configuration
  • Removal os stopwords: Words which are too common to mean anything are removed. In English: a, the, and, ... are removed
  • Stemming: Words end up with their root only. For example: jumped, jumping, jumpy -> jump
With those rules, the query is matched to the stored fields, which are also processed with the same rules.

Partial matches are not performed, unless the query has an asterisk. Example: eng* would match engineering, england, etc.

The query syntax is:
  • a b: Seach for a OR b
  • a +b: Seach for a AND b
  • a -b: Search for A AND NOT b
  • Also, parenthesis can be used to group words, like (a b) -(c d)
The fields searched on users are:
  • Full name
  • Login name
  • Email
  • Custom fields (marked as allowed for search in the product)
The fields searched on advertisements are:
  • Title
  • Description
  • Custom fields
  • User's full name
  • User's login name
  • User's email
  • User's custom fields (marked as allowed for search in the product)
We already have planned for the next release to improve the documentation on full text searches.
Luis Fernando Planella Gonzalez
Cyclos development team

kellmck
Posts: 5
Joined: Tue Feb 10, 2015 3:10 pm

Re: Searching the "Keywords" field

Post by kellmck » Wed Mar 18, 2015 2:30 pm

Thanks so much for the info, Luis!

Allowing the custom profile fields available in user and ad searches works, but it also creates a problem. These fields now appear in the user search box, underneath the "keywords" search field. This is confusing for our members. We want to have just one search bar showing where people can type in whatever data they are looking for. Is this possible?

We also want to create a custom profile field to be queried in the user search keyword field, but have the field only be visible to the user and our system admin. In this field members would enter any and all words they think someone might use to search for their offerings (for example, a clothing boutique owner might enter sweaters, handbags, belts, coats, etc.) The user wouldn't want this whole field to be shown to other users, they would just want their profile to pop up when people search on those items. Is this possible?

Thanks,
Kelleigh

luis
Posts: 182
Joined: Fri Feb 17, 2006 11:01 am

Re: Searching the "Keywords" field

Post by luis » Wed Mar 18, 2015 4:13 pm

kellmck wrote:Allowing the custom profile fields available in user and ad searches works, but it also creates a problem. These fields now appear in the user search box, underneath the "keywords" search field. This is confusing for our members. We want to have just one search bar showing where people can type in whatever data they are looking for. Is this possible?
It is already planned for Cyclos 4.4 to separate the setting for a custom field to be included as a search filter and the one for it to be used in keywords. For 4.3 this is not possible.
kellmck wrote:We also want to create a custom profile field to be queried in the user search keyword field, but have the field only be visible to the user and our system admin. In this field members would enter any and all words they think someone might use to search for their offerings (for example, a clothing boutique owner might enter sweaters, handbags, belts, coats, etc.) The user wouldn't want this whole field to be shown to other users, they would just want their profile to pop up when people search on those items. Is this possible?
We hadn't thought about it, but it can be interesting. When we implement the setting for include a field in keyword search, if possible, we'll make it independent on field visibility, so your suggestion can be achieved.
Luis Fernando Planella Gonzalez
Cyclos development team

kellmck
Posts: 5
Joined: Tue Feb 10, 2015 3:10 pm

Re: Searching the "Keywords" field

Post by kellmck » Mon Mar 23, 2015 4:03 pm

Thanks, Luis. Any idea when 4.4 is slated for release?

luis
Posts: 182
Joined: Fri Feb 17, 2006 11:01 am

Re: Searching the "Keywords" field

Post by luis » Mon Mar 23, 2015 5:19 pm

We don't have an official release date, but we are planning to release 4.4 between April and May.
Luis Fernando Planella Gonzalez
Cyclos development team

Post Reply