Skip to main content

Google search appliance (GSA) sorting and filtering

Working with Google Search Appliance(GSA), sometimes business has requirement of sorting or filtering the results. Browsing the internet did not provide any helpful pointers for the ways to sort or filter the search results therefore I have written these instructions to use sorting & filtering in easy way with examples.

Sorting:
Google Search Appliance(GSA) has provided the tags to sort the results in ascending or descending order. Pages should have meta tags which provides information to GSA box for crawling. Using those tags, sorting can be achieved.

For example: If web pages has a tag

<meta name="title" content="Sumit Bajaj::Passionate Technologist" />

GSA URL should include parameter to sort the results

&sort=meta:title:a  (for arranging all results in ascending order w.r.t title)
&sort=meta:title:d  (for arranging all results in descending order w.r.t title)

Similarly it can be sorted for another meta tags.


Filtering:
Similar like sorting meta tags can be used for filtering as well. Google Search Appliance(GSA) has provided the provision to filter the results too. Pages should have meta tags which provides information to GSA box for crawling. These tags can be used for filtering the output.

For example: If web pages has a tag

<meta name="articledate" content="2014-10-12" />

GSA URL should include parameter to filter the results

&query=inmeta:articledate:daterange:2014-01-01..
(all article whose articledate is greater than 2014-01-01)

&query=inmeta:articledate:daterange:2013-01-01..2014-01-01
(all article whose articledate is in between 2013-01-01 & 2014-01-01)

&query=inmeta:articledate:daterange:..2014-01-01 
(all article whose articledate is lesser than 2014-01-01)

Similarly we can modify the tags and syntax to get desired output.

Reference:
Google Search Appliance document

For more details, you can contact me on "email.bajaj@gmail.com" or visit my website
http://www.bajajsumit.com

Enjoy coding and build the best.
Sumit Bajaj

Popular posts from this blog

Cannot alter the login 'sa', because it does not exist or you do not have permission.

Working on projects, it can happen that 'sa' account gets locked. If it is on local machine OR development boxes, onus would be on you to fix it. If scripts and SQL steps are not working, this might help you fixing the issue.

Steps to unlock 'sa' account and resetting the password.

1. Open SQL Server Configuration Manager

2. Select SQL Server Services -> 'SQL Server' service.
3. Right click on 'SQL Server' service and click on "Startup Parameters". For 2008, server "Startup Parameters" are inside Advanced tab.


4. Add '-m' in startup parameters as shown above and click on 'Add'. This will put SQL server into 'Single User Mode' and local admin will have 'Super User' rights. For 2008, server you have to add ':-m' in the last of the existing query.
5. Save the settings and Restart the service.
6. Now open the SQL Server Management Studio and connect to database using 'Windows Authentication&…

Sitecore - Moving items from web to master

In most of the cases, generally you create items in master database and publish to web/production data. However, sometimes few items are in web database and not in master. Reason can be anything, like you might have deleted it in master but did not publish the parent item or due to some other reason.

If you are thinking, you will create package from web and deploy it in master, that will not work. :-) When you create package from master, it installs the items in master only and same is the case with web.

Right and easy way to do is Transfer the item. Yes, you read it right. There is a provision in Sitecore to transfer the items from one database to another.

Select the item which you want to transfer from one database to another. Right click on it and then select Copying. Click on Transfer. see screenshot



Once you click on Transfer, it opens up a popup box. Click 'Next'. see screenshot

After clicking on next, you have to choose the database where you would like to transfer the…

WFFM: Save to Database

Web Forms For Marketers has become one of the essential component of Sitecore. Almost every website is using forms to capture the inputs from users and it is very common scenario to get the data stored in Database for reporting purpose. Here are few easy steps which can help you storing the form's data in SQL database.


Download the WFFM - SQL Provider(Save To Database) and install it in Sitecore using Installation wizard. All physical files and Sitecore items will be stored in respective location.Once installed, you will notice that it has created a new Action under System-> Modules -> Web Forms for Marketers -> Settings -> Actions -> Save ActionsNow, we have to add connection string in configuration file which will help us storing the data in that database. You have to keep the name of connectionstring to 'wfm' only as same name is referred in WFFM module code.
< add connectionstring="user id=your_db_user_id;password=your_db_password;Data Source=you…