Webjam Search
 

How it works

To trigger and track a search re-index:

  1. Change the date_updated of the webjam_object or content_item to getdate()
  2. Run this in a browser http://search.webjam.com:8080/solr/dataimport?command=delta-import

To test the search index directly:
http://search.webjam.com:8080/solr/select/?q=Totally%20Enormous%20Extinct%20Dinosaurs%20AND%20type:Page%20AND%20channelId:18FC1CA8-4539-4F51-B637-89837FA144F3

Query syntax is fairly simple. Boolean clauses must be in uppercase - AND or OR. Phrases go in "double quotes". Specifying which field to search is done with the fieldname and then a colon. E.g. tags:tagname or channelId:000000-000000-00....... etc

The schema for items in the search index is as follows:

<field name="type" type="string" indexed="true" stored="true" /> 
<field name="id" type="string" indexed="true" stored="true" required="true" />     

<field name="dateUpdated" type="date" indexed="true" stored="true" />  
<field name="dateCreated" type="date" indexed="true" stored="true" />  

<field name="tags" type="string" indexed="true" stored="true" />  
<field name="text" type="text" indexed="true" stored="true" required="true" />  
<field name="title" type="string" indexed="true" stored="true" />  
<field name="url" type="string" indexed="true" stored="true" />  

<field name="layoutModuleId" type="string" indexed="true" stored="true" required="false" />  
<field name="channelId" type="string" indexed="true" stored="true" required="false" />  
<field name="networkId" type="string" indexed="true" stored="true" required="false" />  
<field name="pageId" type="string" indexed="true" stored="true" required="false" />  
<field name="userId" type="string" indexed="true" stored="true" required="false" />  

<field name="type" type="string" indexed="true" stored="true" />  
<field name="id" type="string" indexed="true" stored="true" required="true" /> 

<field name="boost" type="double" indexed="true" stored="true" />


Note: the above channel is the NME channel ID. Change the query and type accordingly.

The main function which controls what gets indexed is:
[generate_search_index_queue]

This gets called in 2 different ways:

 

  1. With no parameters it simply lists the Type and ID of all of the items which are pending to be added to the search index
  2. With an @id parameter it selects the fields from the database that are to be indexed for the item matching the specified ID. Text content (basically what is searched) is sometimes a bit tricky since it exists in several different tables, so we use a user-defined-function to pull it all out.

 

Text content is generated for content items, pages and users with:
[dbo].[get_text]


 

Related links

 

Advertisements

Loading …
  • Server: web2.webjam.com
  • Total queries:
  • Serialization time: 422ms
  • Execution time: 547ms
  • XSLT time: $$$XSLT$$$ms