Update for Examine DLLs & Examine config.

Fixes contextual quick search issue in media section.

[TFS Changeset #67764]
This commit is contained in:
Shandem
2010-06-10 15:50:28 +00:00
parent 41a34e44c4
commit 09626d424d
12 changed files with 942 additions and 964 deletions

View File

@@ -8,8 +8,8 @@ More information and documentation can be found on CodePlex: http://umbracoexami
-->
<ExamineLuceneIndexSets>
<!-- The internal index set used by Umbraco back-office - DO NOT REMOVE -->
<IndexSet SetName="Default" IndexPath="~/App_Data/ExamineIndexes/Internal/">
<IndexStandardFields>
<IndexSet SetName="InternalIndexSet" IndexPath="~/App_Data/ExamineIndexes/Internal/">
<IndexAttributeFields>
<add Name="id" />
<add Name="nodeName" />
<add Name="updateDate" />
@@ -17,43 +17,9 @@ More information and documentation can be found on CodePlex: http://umbracoexami
<add Name="path" />
<add Name="nodeTypeAlias" />
<add Name="parentID" />
</IndexStandardFields>
</IndexAttributeFields>
<IndexUserFields />
<IncludeNodeTypes/>
<ExcludeNodeTypes />
</IndexSet>
<!-- This is an example of an index set created for the Creative Website Starter kit
<IndexSet SetName="CWSIndex" IndexPath="~/App_Data/ExamineIndexes/CWSIndex/">
<IndexStandardFields>
<add Name="id" />
<add Name="nodeName" />
<add Name="updateDate" />
<add Name="writerName" />
<add Name="path" />
<add Name="nodeTypeAlias" />
<add Name="parentID" />
</IndexStandardFields>
<IndexUserFields>
<add Name="headerText" />
<add Name="bodyText" />
<add Name="metaDescription" />
<add Name="metaKeywords" />
<add Name="bodyTextColOne" />
<add Name="bodyTextColTwo" />
</IndexUserFields>
<IncludeNodeTypes>
<add Name="CWS_Home" />
<add Name="CWS_Textpage" />
<add Name="CWS_TextpageTwoCol" />
<add Name="CWS_NewsEventsList" />
<add Name="CWS_NewsItem" />
<add Name="CWS_Gallery" />
<add Name="CWS_EventItem" />
</IncludeNodeTypes>
<ExcludeNodeTypes />
</IndexSet>
-->
</ExamineLuceneIndexSets>

View File

@@ -5,35 +5,23 @@ This configuration file can be extended to add your own search/index providers.
Index sets can be defined in the ExamineIndex.config if you're using the standard provider model.
More information and documentation can be found on CodePlex: http://umbracoexamine.codeplex.com
-->
<UmbracoExamine>
<ExamineIndexProviders enableDefaultEventHandler="true">
-->
<Examine>
<ExamineIndexProviders>
<providers>
<add name="InternalIndex" type="UmbracoExamine.LuceneExamineIndexer, UmbracoExamine"
indexSet="Default"
enabled="true"
debug="false"
<add name="InternalIndexer" type="UmbracoExamine.LuceneExamineIndexer, UmbracoExamine"
runAsync="true"
supportUnpublished="true"
supportProtected="true"
interval="10"
analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"/>
<!-- This is an example of an index provider created for the Creative Website Starter kit
<add name="CWSIndex" type="UmbracoExamine.LuceneExamineIndexer, UmbracoExamine"
indexSet="CWSIndex"
enabled="false"
debug="false"/>
-->
</providers>
</ExamineIndexProviders>
<ExamineSearchProviders defaultProvider="InternalSearch">
<ExamineSearchProviders defaultProvider="InternalSearcher">
<providers>
<add name="InternalSearch" type="UmbracoExamine.LuceneExamineSearcher, UmbracoExamine"
indexSet="Default"
<add name="InternalSearcher" type="UmbracoExamine.LuceneExamineSearcher, UmbracoExamine"
analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"/>
<!-- This is an example of a search provider created for the Creative Website Starter kit
<add name="CWSIndex" type="UmbracoExamine.LuceneExamineSearcher, UmbracoExamine"
indexSet="CWSIndex"/>
-->
</providers>
</ExamineSearchProviders>
</UmbracoExamine>
</Examine>

Binary file not shown.

View File

@@ -4,6 +4,38 @@
<name>Examine</name>
</assembly>
<members>
<member name="M:Examine.SearchResult.Equals(System.Object)">
<summary>
Override this method so that the Distinct() operator works
</summary>
<param name="obj"></param>
<returns></returns>
</member>
<member name="M:Examine.SearchResult.GetHashCode">
<summary>
Override this method so that the Distinct() operator works
</summary>
<returns></returns>
</member>
<member name="P:Examine.SearchResult.Item(System.Int32)">
<summary>
Returns the key value pair for the index specified
</summary>
<param name="resultIndex"></param>
<returns></returns>
</member>
<member name="P:Examine.SearchResult.Item(System.String)">
<summary>
Returns the value for the key specified
</summary>
<param name="key"></param>
<returns></returns>
</member>
<member name="T:Examine.IndexCriteria">
<summary>
a data structure for storing indexing/searching instructions
</summary>
</member>
<member name="T:Examine.ISearcher">
<summary>
An interface representing an Examine Searcher
@@ -77,71 +109,6 @@
<param name="defaultOperation">The default operation.</param>
<returns>A blank SearchCriteria</returns>
</member>
<member name="M:Examine.SearchResult.Equals(System.Object)">
<summary>
Override this method so that the Distinct() operator works
</summary>
<param name="obj"></param>
<returns></returns>
</member>
<member name="M:Examine.SearchResult.GetHashCode">
<summary>
Override this method so that the Distinct() operator works
</summary>
<returns></returns>
</member>
<member name="P:Examine.SearchResult.Item(System.Int32)">
<summary>
Returns the key value pair for the index specified
</summary>
<param name="resultIndex"></param>
<returns></returns>
</member>
<member name="P:Examine.SearchResult.Item(System.String)">
<summary>
Returns the value for the key specified
</summary>
<param name="key"></param>
<returns></returns>
</member>
<member name="T:Examine.IndexCriteria">
<summary>
a data structure for storing indexing/searching instructions
</summary>
</member>
<member name="T:Examine.Config.SearchProvidersSection">
<summary>
Config section for the Examine search providers
</summary>
</member>
<member name="P:Examine.Config.SearchProvidersSection.Providers">
<summary>
Gets the search providers.
</summary>
<value>The providers.</value>
</member>
<member name="P:Examine.Config.SearchProvidersSection.DefaultProvider">
<summary>
Gets or sets the default provider.
</summary>
<value>The default provider.</value>
</member>
<member name="T:Examine.Config.IndexProvidersSection">
<summary>
Config section for the Examine Index Providers
</summary>
</member>
<member name="P:Examine.Config.IndexProvidersSection.Providers">
<summary>
Gets the indexing providers.
</summary>
<value>The providers.</value>
</member>
<member name="P:Examine.Config.IndexProvidersSection.EnableDefaultEventHandler">
<summary>
If true, the IndexingActionHandler will be run to keep the default index up to date.
</summary>
</member>
<member name="T:Examine.IIndexer">
<summary>
Interface to represent an Examine Indexer
@@ -158,7 +125,7 @@
<summary>
Deletes a node from the index
</summary>
<param name="node">Node to delete</param>
<param name="nodeId">Node to delete</param>
</member>
<member name="M:Examine.IIndexer.IndexAll(Examine.IndexType)">
<summary>
@@ -227,11 +194,6 @@
Singleton
</summary>
</member>
<member name="T:Examine.SearchCriteria.ISearchCriteria">
<summary>
</summary>
</member>
<member name="T:Examine.SearchCriteria.IQuery">
<summary>
Defines the query methods for the fluent search API
@@ -408,27 +370,84 @@
</summary>
<value>The boolean operation.</value>
</member>
<member name="M:Examine.SearchCriteria.ISearchCriteria.RawQuery(System.String)">
<member name="T:Examine.Config.SearchProvidersSection">
<summary>
Passes a text string which is preformatted for the underlying search API. Examine will not modify this
Config section for the Examine search providers
</summary>
</member>
<member name="P:Examine.Config.SearchProvidersSection.Providers">
<summary>
Gets the search providers.
</summary>
<value>The providers.</value>
</member>
<member name="P:Examine.Config.SearchProvidersSection.DefaultProvider">
<summary>
Gets or sets the default provider.
</summary>
<value>The default provider.</value>
</member>
<member name="T:Examine.Config.IndexProvidersSection">
<summary>
Config section for the Examine Index Providers
</summary>
</member>
<member name="P:Examine.Config.IndexProvidersSection.Providers">
<summary>
Gets the indexing providers.
</summary>
<value>The providers.</value>
</member>
<member name="T:Examine.Providers.IndexProviderCollection">
<summary>
A collection of Examine Index Providers
</summary>
</member>
<member name="M:Examine.Providers.IndexProviderCollection.Add(System.Configuration.Provider.ProviderBase)">
<summary>
Adds a provider to the collection.
</summary>
<param name="provider">The provider to be added.</param>
<exception cref="T:System.NotSupportedException">
The collection is read-only.
</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="provider"/> is null.
</exception>
<exception cref="T:System.ArgumentException">
The <see cref="P:System.Configuration.Provider.ProviderBase.Name"/> of <paramref name="provider"/> is null.
- or -
The length of the <see cref="P:System.Configuration.Provider.ProviderBase.Name"/> of <paramref name="provider"/> is less than 1.
</exception>
<PermissionSet>
<IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence"/>
</PermissionSet>
</member>
<member name="M:Examine.Providers.IndexProviderCollection.System#Collections#Generic#IEnumerable{Examine#Providers#BaseIndexProvider}#GetEnumerator">
<summary>
Gets the enumerator.
</summary>
<remarks>
This allows a developer to completely bypass and Examine logic and comprise their own query text which they are passing in.
It means that if the search is too complex to achieve with the fluent API, or too dynamic to achieve with a static language
the provider can still handle it.
</remarks>
<param name="query">The query.</param>
<returns></returns>
</member>
<member name="P:Examine.SearchCriteria.ISearchCriteria.SearchIndexType">
<member name="M:Examine.Providers.IndexProviderCollection.System#Collections#IEnumerable#GetEnumerator">
<summary>
Indicates the type of data to search on
Returns an object that implements the <see cref="T:System.Collections.IEnumerator"/> interface to iterate through the collection.
</summary>
<returns>
An object that implements <see cref="T:System.Collections.IEnumerator"/> to iterate through the collection.
</returns>
</member>
<member name="T:Examine.IndexedNode">
<member name="P:Examine.Providers.IndexProviderCollection.Item(System.String)">
<summary>
Simple class to store the definition of an indexed node
Gets the <see cref="T:Examine.Providers.BaseIndexProvider"/> with the specified name.
</summary>
<value></value>
</member>
<member name="P:Examine.Providers.IndexProviderCollection.Item(System.Int32)">
<summary>
Gets the <see cref="T:Examine.Providers.BaseIndexProvider"/> at the specified index.
</summary>
<value></value>
</member>
<member name="T:Examine.Config.ExamineSettings">
<summary>
@@ -453,6 +472,28 @@
</summary>
<value>The index providers.</value>
</member>
<member name="T:Examine.SearchCriteria.ISearchCriteria">
<summary>
</summary>
</member>
<member name="M:Examine.SearchCriteria.ISearchCriteria.RawQuery(System.String)">
<summary>
Passes a text string which is preformatted for the underlying search API. Examine will not modify this
</summary>
<remarks>
This allows a developer to completely bypass and Examine logic and comprise their own query text which they are passing in.
It means that if the search is too complex to achieve with the fluent API, or too dynamic to achieve with a static language
the provider can still handle it.
</remarks>
<param name="query">The query.</param>
<returns></returns>
</member>
<member name="P:Examine.SearchCriteria.ISearchCriteria.SearchIndexType">
<summary>
Indicates the type of data to search on
</summary>
</member>
<member name="T:Examine.Providers.BaseIndexProvider">
<summary>
Base class for an Examine Index Provider. You must implement this class to create an IndexProvider
@@ -563,6 +604,11 @@
</summary>
<param name="e">The <see cref="T:Examine.IndexingNodesEventArgs"/> instance containing the event data.</param>
</member>
<member name="P:Examine.Providers.BaseIndexProvider.EnableDefaultEventHandler">
<summary>
If true, the IndexingActionHandler will be run to keep the default index up to date.
</summary>
</member>
<member name="P:Examine.Providers.BaseIndexProvider.SupportUnpublishedContent">
<summary>
Determines if the manager will call the indexing methods when content is saved or deleted as
@@ -619,56 +665,10 @@
Occurs when node is found but outside the supported node set
</summary>
</member>
<member name="T:Examine.Providers.IndexProviderCollection">
<member name="T:Examine.IndexedNode">
<summary>
A collection of Examine Index Providers
Simple class to store the definition of an indexed node
</summary>
</member>
<member name="M:Examine.Providers.IndexProviderCollection.Add(System.Configuration.Provider.ProviderBase)">
<summary>
Adds a provider to the collection.
</summary>
<param name="provider">The provider to be added.</param>
<exception cref="T:System.NotSupportedException">
The collection is read-only.
</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="provider"/> is null.
</exception>
<exception cref="T:System.ArgumentException">
The <see cref="P:System.Configuration.Provider.ProviderBase.Name"/> of <paramref name="provider"/> is null.
- or -
The length of the <see cref="P:System.Configuration.Provider.ProviderBase.Name"/> of <paramref name="provider"/> is less than 1.
</exception>
<PermissionSet>
<IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence"/>
</PermissionSet>
</member>
<member name="M:Examine.Providers.IndexProviderCollection.System#Collections#Generic#IEnumerable{Examine#Providers#BaseIndexProvider}#GetEnumerator">
<summary>
Gets the enumerator.
</summary>
<returns></returns>
</member>
<member name="M:Examine.Providers.IndexProviderCollection.System#Collections#IEnumerable#GetEnumerator">
<summary>
Returns an object that implements the <see cref="T:System.Collections.IEnumerator"/> interface to iterate through the collection.
</summary>
<returns>
An object that implements <see cref="T:System.Collections.IEnumerator"/> to iterate through the collection.
</returns>
</member>
<member name="P:Examine.Providers.IndexProviderCollection.Item(System.String)">
<summary>
Gets the <see cref="T:Examine.Providers.BaseIndexProvider"/> with the specified name.
</summary>
<value></value>
</member>
<member name="P:Examine.Providers.IndexProviderCollection.Item(System.Int32)">
<summary>
Gets the <see cref="T:Examine.Providers.BaseIndexProvider"/> at the specified index.
</summary>
<value></value>
</member>
</members>
</doc>

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -34,7 +34,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{05329D
config templates\config\404handlers.config = config templates\config\404handlers.config
config templates\config\ClientDependency.config = config templates\config\ClientDependency.config
config templates\config\Dashboard.config = config templates\config\Dashboard.config
umbraco\presentation\config\ExamineIndex.config = umbraco\presentation\config\ExamineIndex.config
config templates\config\ExamineIndex.config = config templates\config\ExamineIndex.config
config templates\config\ExamineSettings.config = config templates\config\ExamineSettings.config
config templates\config\formHandlers.config = config templates\config\formHandlers.config

View File

@@ -215,7 +215,7 @@ namespace umbraco.presentation
{
get
{
return ExamineManager.Instance.SearchProviderCollection["InternalSearch"];
return ExamineManager.Instance.SearchProviderCollection["InternalSearcher"];
}
}
}

View File

@@ -10,7 +10,7 @@ NOTES:
* Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config
* A new version will invalidate both client and server cache and create new persisted files
-->
<clientDependency version="27">
<clientDependency version="28">
<fileRegistration defaultProvider="PageHeaderProvider" fileDependencyExtensions=".js,.css">
<providers>

View File

@@ -8,7 +8,7 @@ More information and documentation can be found on CodePlex: http://umbracoexami
-->
<ExamineLuceneIndexSets>
<!-- The internal index set used by Umbraco back-office - DO NOT REMOVE -->
<IndexSet SetName="Default" IndexPath="~/App_Data/ExamineIndexes/Internal/">
<IndexSet SetName="InternalIndexSet" IndexPath="~/App_Data/ExamineIndexes/Internal/">
<IndexAttributeFields>
<add Name="id" />
<add Name="nodeName" />
@@ -22,38 +22,4 @@ More information and documentation can be found on CodePlex: http://umbracoexami
<IncludeNodeTypes/>
<ExcludeNodeTypes />
</IndexSet>
<!-- This is an example of an index set created for the Creative Website Starter kit -->
<IndexSet SetName="CWSIndex" IndexPath="~/App_Data/ExamineIndexes/CWSIndex/">
<IndexAttributeFields>
<add Name="id" />
<add Name="nodeName" />
<add Name="updateDate" />
<add Name="writerName" />
<add Name="path" />
<add Name="nodeTypeAlias" />
<add Name="parentID" />
</IndexAttributeFields>
<IndexUserFields>
<add Name="headerText" />
<add Name="bodyText" />
<add Name="metaDescription" />
<add Name="metaKeywords" />
<add Name="bodyTextColOne" />
<add Name="bodyTextColTwo" />
</IndexUserFields>
<IncludeNodeTypes>
<add Name="CWS_Home" />
<add Name="CWS_Textpage" />
<add Name="CWS_TextpageTwoCol" />
<add Name="CWS_NewsEventsList" />
<add Name="CWS_NewsItem" />
<add Name="CWS_Gallery" />
<add Name="CWS_EventItem" />
</IncludeNodeTypes>
<ExcludeNodeTypes />
</IndexSet>
</ExamineLuceneIndexSets>

View File

@@ -6,35 +6,21 @@ Index sets can be defined in the ExamineIndex.config if you're using the standar
More information and documentation can be found on CodePlex: http://umbracoexamine.codeplex.com
-->
<Examine>
<ExamineIndexProviders enableDefaultEventHandler="true">
<Examine>
<ExamineIndexProviders>
<providers>
<add name="InternalIndex" type="UmbracoExamine.LuceneExamineIndexer, UmbracoExamine"
indexSet="Default"
enabled="true"
<add name="InternalIndexer" type="UmbracoExamine.LuceneExamineIndexer, UmbracoExamine"
runAsync="true"
supportUnpublished="true"
supportProtected="true"
interval="10"
analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"/>
<!-- This is an example of an index provider created for the Creative Website Starter kit -->
<add name="CWSIndex" type="UmbracoExamine.LuceneExamineIndexer, UmbracoExamine"
indexSet="CWSIndex"
enabled="false"
debug="false"/>
</providers>
</ExamineIndexProviders>
<ExamineSearchProviders defaultProvider="InternalSearch">
<ExamineSearchProviders defaultProvider="InternalSearcher">
<providers>
<add name="InternalSearch" type="UmbracoExamine.LuceneExamineSearcher, UmbracoExamine"
indexSet="Default"
analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"/>
<!-- This is an example of a search provider created for the Creative Website Starter kit-->
<add name="CWSIndex" type="UmbracoExamine.LuceneExamineSearcher, UmbracoExamine"
indexSet="CWSIndex"/>
<add name="InternalSearcher" type="UmbracoExamine.LuceneExamineSearcher, UmbracoExamine"
analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"/>
</providers>
</ExamineSearchProviders>
</Examine>

View File

@@ -1,9 +1,10 @@
(function($) {
(function ($) {
$.fn.UmbQuickSearch = function(url) {
$.fn.UmbQuickSearch = function (url) {
var getSearchApp = function() {
return (UmbClientMgr.mainWindow().location.hash != "" && UmbClientMgr.mainWindow().location.hash.toLowerCase().substring(1)) == "media".toLowerCase()
var getSearchApp = function () {
return (UmbClientMgr.mainWindow().location.hash != ""
&& UmbClientMgr.mainWindow().location.hash.toLowerCase().substring(1)) == "media".toLowerCase()
? "Media"
: "Content";
};
@@ -17,14 +18,14 @@
matchContains: false,
extraParams: {
//return the current app, if it's not media, then it's Content as this is the only searches that are supported.
app: function() {
app: function () {
return getSearchApp();
},
rnd: function() {
rnd: function () {
return Umbraco.Utils.generateRandom();
}
},
parse: function(data) {
parse: function (data) {
var parsed = [];
for (var i = 0; i < data.length; i++) {
parsed[parsed.length] = {
@@ -35,29 +36,30 @@
}
return parsed;
},
formatItem: function(item) {
formatItem: function (item) {
return item.Fields.nodeName + " <span class='nodeId'>(" + item.Id + ")</span>";
}
};
$(this)
.autocomplete(url, acOptions)
.result(function(e, data) {
UmbClientMgr.contentFrame().location.href = "editContent.aspx?id=" + data.Id;
.result(function (e, data) {
var url = getSearchApp() == "Media" ? "editMedia.aspx" : "editContent.aspx";
UmbClientMgr.contentFrame().location.href = url + "?id=" + data.Id;
$("#umbSearchField").val(UmbClientMgr.uiKeys()["general_typeToSearch"]);
right.focus();
});
$(this).focus(function() {
$(this).focus(function () {
$(this).val('');
});
$(this).blur(function() {
$(this).blur(function () {
$(this).val(UmbClientMgr.uiKeys()["general_typeToSearch"]);
});
$(this).keyup(function(e) {
$(this).keyup(function (e) {
if (e.keyCode == 13) {
UmbClientMgr.openModalWindow('dialogs/search.aspx?rndo=' + Umbraco.Utils.generateRandom() + '&search=' + jQuery(this).val() + '&app=' + getSearchApp(), 'Search', true, 620, 470);