solr.KeywordTokenizerFactory requires reindex? - indexing

In my existing Solr core index. I am trying to get relevant search results working with or without the words, hyphens.
Here is the query example for like clause: q=Address:(*5-6*) AND SID:(*584*) AND City:(*brentwood*)
In the configuration file /conf/managed-schema.xml I changed the tokenizer to solr.KeywordTokenizerFactory from the default tokenizer solr.StandardTokenizerFactory on general text filed text_general.
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100" multiValued="true">
<analyzer type="index">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
The above configuration is working fine for new core index data. But it is not working on the existing core index. I had to delete the old index data and reindex from the scratch. Is there any way to work reindex the data without delete the old data?

Related

izpack 4.3.4 programs and features

I am using IzPack 4.3.4 and I am trying to add my uninstaller to
the Programs and Features section of the Windows control panel
I am using Windows 10 (Build 10240).
But it does not seem to work, I modified the existing simple sample and added the following code to install.xml:
<natives>
<native type="3rdparty" name="COIOSHelper.dll" stage="both">
</native>
<native type="3rdparty" name="COIOSHelper_x64.dll" stage="both">
</native>
</natives>
<listeners>
<listener classname="RegistryInstallerListener" stage="install"/>
<listener classname="RegistryUninstallerListener" stage="uninstall"/>
</listeners>
Various sources, including the IzPack docs, state that this should make it work. But nothing appears in the Programs and Features list.
So what do I need to do in order to make this work?
You also need ShellLink.dll for this to work:
<natives>
<native type="izpack" name="ShellLink.dll" />
<native type="izpack" name="ShellLink_x64.dll" />
<native type="3rdparty" name="COIOSHelper.dll" stage="both">
<os family="windows" />
</native>
<native type="3rdparty" name="COIOSHelper_x64.dll" stage="both">
<os family="windows" />
</native>
</natives>

Custom Lucene Index not visible in Sitecore's Indexing Manager

I have been given the task of implementing content search in a Sitecore (ver. 7.2) based website. For the same, I am planning to use the Lucene search provider as it comes bundled with Sitecore out of the box and also since our search requirements don't seem too exhaustive for me to attempt using Solr.
We want users to be able to search a bucketable list of content residing in Sitecore from the main site.
The documentation and blogs explaining how to do this are sketchy and incomplete.
I used the below blog as a reference point:
http://www.mattburkedev.com/sitecore-7-contentsearch-tips/
After adding the index configuration file in App_Config/Include folder, I expected to see the new index in Sitecore's Indexing Manager. However i do not notice the same there. Any ideas on what I'm doing wrong?
I wanted to create a custom index so that I can target only particular sitecore nodes. Please see my configuration file. I only need to search for data within the articles node using the fields set in the articles item template.
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<contentSearch>
<configuration type="Sitecore.ContentSearch.LuceneProvider.LuceneSearchConfiguration, Sitecore.ContentSearch.LuceneProvider">
<indexes hint="list:AddIndex">
<index id="book_index" type="Sitecore.ContentSearch.LuceneProvider.LuceneIndex, Sitecore.ContentSearch.LuceneProvider">
<param desc="name">$(id)</param>
<param desc="folder">$(id)</param>
<!-- This initializes index property store. Id has to be set to the index id -->
<param desc="propertyStore" ref="contentSearch/databasePropertyStore" param1="$(id)" />
<strategies hint="list:AddStrategy">
<!-- NOTE: order of these is controls the execution order -->
<strategy ref="contentSearch/indexUpdateStrategies/syncMaster" />
</strategies>
<commitPolicyExecutor type="Sitecore.ContentSearch.CommitPolicyExecutor, Sitecore.ContentSearch">
<policies hint="list:AddCommitPolicy">
<policy type="Sitecore.ContentSearch.TimeIntervalCommitPolicy, Sitecore.ContentSearch" />
</policies>
</commitPolicyExecutor>
<locations hint="list:AddCrawler">
<crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
<Database>master</Database>
<Root>/sitecore/content/support/articles</Root>
</crawler>
</locations>
</index>
</indexes>
</configuration>
</contentSearch>
</sitecore>
</configuration>
I was finally able to see my index in the Indexing Manager. There seemed to be a problem with the name of the config file. I named my index file "Sitecore.ContentSearch.Lucene.Downloads.config" and after that, the index appeared. The file was being patched in before the standard Lucene config and hence the issue.
Just rename your config file to z.Sitecore.ContentSearch.Lucene.Downloads.config
This is because when sitecore will merge all your configs in one file, the filename is taken into consideration.
Thanks
Some of your namespaces are off in your config. Please try this config and see if it shows up for you. I have modified it to match your parameters. This should work for you.
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<contentSearch>
<configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
<indexes hint="list:AddIndex">
<index id="book_index" type="Sitecore.ContentSearch.LuceneProvider.LuceneIndex, Sitecore.ContentSearch.LuceneProvider">
<param desc="name">$(id)</param>
<param desc="folder">$(id)</param>
<!-- This initializes index property store. Id has to be set to the index id -->
<param desc="propertyStore" ref="contentSearch/databasePropertyStore" param1="$(id)" />
<configuration ref="contentSearch/indexConfigurations/defaultLuceneIndexConfiguration" />
<strategies hint="list:AddStrategy">
<!-- NOTE: order of these is controls the execution order -->
<strategy ref="contentSearch/indexUpdateStrategies/syncMaster" />
</strategies>
<commitPolicyExecutor type="Sitecore.ContentSearch.CommitPolicyExecutor, Sitecore.ContentSearch">
<policies hint="list:AddCommitPolicy">
<policy type="Sitecore.ContentSearch.TimeIntervalCommitPolicy, Sitecore.ContentSearch" />
</policies>
</commitPolicyExecutor>
<locations hint="list:AddCrawler">
<crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
<Database>master</Database>
<Root>/sitecore/content/support/articles</Root>
</crawler>
</locations>
</index>
</indexes>
</configuration>
</contentSearch>
</sitecore>
</configuration>

Is it possible to integrate IBM RTC Advisor fields to JAXB

I'm working on IBM RTC Advisors, based on a Workshop provided in http://jazz.net.
Now I´m trying to port the xsd document provided in their OSGi module to annotations+jaxb.
That´s part of the XSD:
<xsd:element name="followup-action" substitutionGroup="process:followup-action"
type="buildOnStateChangeType"/>
<xsd:complexType name="buildOnStateChangeType">
<xsd:annotation>
<xsd:documentation>
This type defines the build on state change type. It is a
subtype of the abstract process:followupActionType. This
restriction, along with the substitutionGroup specification
above, makes it possible to add configuration of the participant
to a project or team area's process configuration. Note the
forward references to the trigger and build types defined below.
Take particular note of the id attribute. It is required and has
a fixed value that points to our operation participant extension.
</xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:restriction base="process:followupActionType">
<xsd:all>
<xsd:element name="trigger" type="triggerType"
minOccurs="1" maxOccurs="1"/>
<xsd:element name="build" type="buildType" minOccurs="1"
maxOccurs="1"/>
</xsd:all>
<xsd:attribute name="id" type="xsd:string" use="required"
fixed="net.jazz.rtcext.workitem.extensions.service.buildOnStateChange"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="triggerType">
<xsd:annotation>
<xsd:documentation>
This type defines the work item type to be monitored
and the work item state that should trigger the
operation participant.
</xsd:documentation>
</xsd:annotation>
<xsd:all>
<xsd:element name="changed-workitem-type" minOccurs="1"
maxOccurs="1">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:string"
use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="trigger-state" minOccurs="1" maxOccurs="1">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:string"
use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="buildType">
<xsd:annotation>
<xsd:documentation>
This type defines the build to run. At this point, it just
includes the build definition id. In the future, it could
include more information, for example, a list of properties
to pass to the build.
</xsd:documentation>
</xsd:annotation>
<xsd:all>
<xsd:element name="build-definition" minOccurs="1" maxOccurs="1">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:string"
use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:all>
</xsd:complexType>
And this is part of the XML from process template:
<followup-action
xmlns="http://net.jazz.rtcext.workitem.extensions.service/server/buildOnStateChange"
description="When the specified work item type changes to the specified state, the
specified build will be requested."
id="net.jazz.rtcext.workitem.extensions.service.buildOnStateChange"
name="Build on State Change">
<trigger>
<changed-workitem-type id="com.ibm.team.apt.workItemType.story"/>
<trigger-state id="com.ibm.team.apt.story.tested"/>
</trigger>
<build>
<build-definition id="our.integration.build.bogus"/>
</build>
</followup-action>
My problem is, how is the best way to port that XSD, to Java Classes with JAXB annotations? I tried reverse engineering using Eclipse (Luna) JAXB support.
Source: https://jazz.net/library/article/1000
Thank you
Sorry, can't comment yet........
Why do you want to do what you describe above? The data described by the XSD is stored in the process configuration and there is a set of API available to access the data from within the extension.

Showing command on toolbar based on perspective

I want to show a command on the toolbar based on the perspective. I have used core expressions to achieve this as below.
<extension point="org.eclipse.core.expressions.definitions">
<definition id="onValidationPerspective">
<with variable="activeWorkbenchWindow.activePerspective">
<equals value="com.sample.perspective1"/>
</with>
</definition>
</extension>
and I have used this in the command tag as below.
<command
commandId="com.sample.run.root"
icon="icons/run_exc.gif"
label="Reset Card"
style="pulldown">
<visibleWhen checkEnabled="false">
<reference
definitionId="onValidationPerspective">
</reference>
</visibleWhen>
</command>
The above code is working fine.
But I want to extend this for mutiple perspectives, i.e. I want to show the commands on the toolbar in 2 perspectives namely com.sample.perspective1 and com.sample.perspective2.
How can I achieve this using core expressions?
You can use the OR operation element:
<definition id="onValidationPerspective">
<or>
<with ...
<with ...
</or>
</definition>
<definition id="onValidationPerspective">
<with variable="activeWorkbenchWindow.activePerspective">
<or>
<equals value="com.sample.perspective1"/>
<equals value="com.sample.perspective2"/>
</or>
</with>
</definition>

Nesting Apache Tiles Template

So I found this: http://tiles.apache.org/framework/tutorial/advanced/nesting-extending.html
Here is the example:
<definition name="myapp.homepage" template="/layouts/classic.jsp">
<put-attribute name="title" value="Tiles tutorial homepage" />
<put-attribute name="header" value="/tiles/banner.jsp" />
<put-attribute name="menu" value="/tiles/common_menu.jsp" />
<put-attribute name="body">
<definition template="/layouts/three_rows.jsp">
<put-attribute name="one" value="/tiles/headlines.jsp" />
<put-attribute name="two" value="/tiles/topics.jsp" />
<put-attribute name="one" value="/tiles/comments.jsp" />
</definition>
</put-attribute>
<put-attribute name="footer" value="/tiles/credits.jsp" />
</definition>
So I defined this:
<definition name="mgmt.base.layout" extends="base.layout">
<put-attribute name="body">
<definition template="/WEB-INF/mgmt/config/mgmtBody.jsp"/>
<put-attribute name="adminLeft" value="/WEB-INF/mgmt/config/left.jsp"/>
<put-attribute name="adminRight" value="/tiles/blank.html"/>
</definition>
</put-attribute>
</definition>
But the funny part is that, even their own documentation is wrong:
2009-05-12 11:20:56,088 [main] ERROR - org.apache.commons.digester.Digester.error(Digester.java:1635): Parse Error at line 17 column 68: Attribute "name" is required and must be specified for element type "definition". org.xml.sax.SAXParseException: Attribute "name" is required and must be specified for element type "definition".
Even though I define a name for it, it still gives the following error:
2009-05-12 11:35:31,818 [main] ERROR - org.apache.commons.digester.Digester.error(Digester.java:1635): Parse Error at line 21 column 19: The content of element type "put-attribute" must match "null".
org.xml.sax.SAXParseException: The content of element type "put-attribute" must match "null".
What is this mean?!!!!
Changing the DTD version to 2.1 solved my problem!
The schema you use requires that put-attribute is a leaf node, i.e. can't contain child elements - so you can't do that. Find out if a newer version of the schema (must be in Tiles docs or examples) allows for nested tiles templates.
-Kalle
So basically I am using a older version of tiles and using new version schema:
Here is the syntax for older nested schema:
http://tiles.apache.org/2.0/framework/tutorial/advanced/nesting-extending.html