Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a node in XML with the name "productPageTitle" and I dont want this node to be a part of search result.
<ExcludeNodeTypes> <add Name="titleProperties"/> </ExcludeNodeTypes>
So I used <ExcludeNodeType> but still as a part of result.
How can I exclude this node from search results?
Hi Manish,
In your razor script did you reference this property alias ?
Also have try using lucence to see the words being indexed ?
In your razor script did you reference this property alias ? -- where to refrence
I just added in ExamineIndex.config file
As
<IndexSet SetName="RazorSiteIndexSet"
IndexPath="~/App_Data/TEMP/ExamineIndexes/RazorSite/" />
<ExcludeNodeTypes>
<add Name="productPageTitle" />
<ExcludeNodeTypes />
<IndexSet SetName="ExternalIndexSet"
IndexPath="~/App_Data/TEMP/ExamineIndexes/External/" />
</ExamineLuceneIndexSets>
where <add Name="productPageTitle" /> is alias of generic property.
Please response in detail so i can get it
<!-- Default Indexset for external searches, this indexes all fields on all types of nodes-->
</ExcludeNodeTypes>
Hey Manish, what is the specific error in the .cshtml?
You can use Luke (http://code.google.com/p/luke/) to check what is being indexed with Lucene.
Also, I would not get or filter data in the razor view.
all works fine if i use
<IndexSet SetName="ExternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/External/" />
but if add this
<IndexSet SetName="InternalMemberIndexSet"
IndexPath="~/App_Data/TEMP/ExamineIndexes/InternalMember/">
<IndexAttributeFields>
<add Name="id" />
<add Name="nodeName" />
<add Name="updateDate" />
<add Name="writerName" />
<add Name="loginName" />
<add Name="email" />
<add Name="nodeTypeAlias" />
</IndexAttributeFields>
<IndexUserFields />
<IncludeNodeTypes />
</IndexSet>
</>
gies me error ::Error loading Razor Script SearchFilter.cshtml
but in case of first it also display the result if the search key is the part of page title and i don't want to add if search key exists in page title.
This is an old post..but I believe the problem is that you are closing the index set before setting it's properties
<IndexSet SetName="RazorSiteIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/RazorSite/" /> <ExcludeNodeTypes> <add Name="productPageTitle" /> <ExcludeNodeTypes /> <IndexSet SetName="ExternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/External/" />
The above should instead be:
<IndexSet SetName="RazorSiteIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/RazorSite/"> <ExcludeNodeTypes> <add Name="productPageTitle" /> <ExcludeNodeTypes /> </IndexSet> <IndexSet SetName="ExternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/External/" />
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Exclude Node Type is not working (Razor Search)
I have a node in XML with the name "productPageTitle" and I dont want this node to be a part of search result.
<ExcludeNodeTypes>
<add Name="titleProperties"/>
</ExcludeNodeTypes>
So I used <ExcludeNodeType> but still as a part of result.
How can I exclude this node from search results?
Hi Manish,
In your razor script did you reference this property alias ?
Also have try using lucence to see the words being indexed ?
In your razor script did you reference this property alias ? -- where to refrence
I just added in ExamineIndex.config file
As
<IndexSet SetName="RazorSiteIndexSet"
IndexPath="~/App_Data/TEMP/ExamineIndexes/RazorSite/" />
<ExcludeNodeTypes>
<add Name="productPageTitle" />
<ExcludeNodeTypes />
<IndexSet SetName="ExternalIndexSet"
IndexPath="~/App_Data/TEMP/ExamineIndexes/External/" />
</ExamineLuceneIndexSets>
where <add Name="productPageTitle" /> is alias of generic property.
Please response in detail so i can get it
<!-- Default Indexset for external searches, this indexes all fields on all types of nodes-->
<IndexSet SetName="RazorSiteIndexSet"
IndexPath="~/App_Data/TEMP/ExamineIndexes/RazorSite/" />
<ExcludeNodeTypes>
<add Name="productPageTitle" />
</ExcludeNodeTypes>
<IndexSet SetName="ExternalIndexSet"
IndexPath="~/App_Data/TEMP/ExamineIndexes/External/" />
Hey Manish, what is the specific error in the .cshtml?
You can use Luke (http://code.google.com/p/luke/) to check what is being indexed with Lucene.
Also, I would not get or filter data in the razor view.
all works fine if i use
<!-- Default Indexset for external searches, this indexes all fields on all types of nodes-->
<IndexSet SetName="RazorSiteIndexSet"
IndexPath="~/App_Data/TEMP/ExamineIndexes/RazorSite/" />
<IndexSet SetName="ExternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/External/" />
</ExamineLuceneIndexSets>
but if add this
<IndexSet SetName="InternalMemberIndexSet"
IndexPath="~/App_Data/TEMP/ExamineIndexes/InternalMember/">
<IndexAttributeFields>
<add Name="id" />
<add Name="nodeName" />
<add Name="updateDate" />
<add Name="writerName" />
<add Name="loginName" />
<add Name="email" />
<add Name="nodeTypeAlias" />
<add Name="productPageTitle" />
</IndexAttributeFields>
<IndexUserFields />
<IncludeNodeTypes />
<ExcludeNodeTypes />
</IndexSet>
<!-- Default Indexset for external searches, this indexes all fields on all types of nodes-->
<IndexSet SetName="RazorSiteIndexSet"
IndexPath="~/App_Data/TEMP/ExamineIndexes/RazorSite/" />
<IndexSet SetName="ExternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/External/" />
</>
gies me error ::Error loading Razor Script SearchFilter.cshtml
but in case of first it also display the result if the search key is the part of page title and i don't want to add if search key exists in page title.
This is an old post..but I believe the problem is that you are closing the index set before setting it's properties
The above should instead be:
is working on a reply...