forked from SolrNet/SolrNet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request SolrNet#354 from SolrNet/collation-improvements
Collation improvements
- Loading branch information
Showing
7 changed files
with
209 additions
and
17 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
SolrNet.Tests/Resources/responseWithSpellCheckingAndCollationsSolr4-.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<response> | ||
<result numFound="1" start="0"> | ||
<doc> | ||
<str name="Key">224fbdc1-12df-4520-9fbe-dd91f916eba1</str> | ||
</doc> | ||
</result> | ||
<lst name="spellcheck"> | ||
<lst name="suggestions"> | ||
<lst name="aodit"> | ||
<int name="numFound">5</int> | ||
<int name="startOffset">0</int> | ||
<int name="endOffset">5</int> | ||
<arr name="suggestion"> | ||
<str>audit</str> | ||
<str>aod it</str> | ||
<str>addit</str> | ||
<str>ao dit</str> | ||
<str>andit</str> | ||
</arr> | ||
</lst> | ||
<lst name="differences"> | ||
<int name="numFound">4</int> | ||
<int name="startOffset">6</int> | ||
<int name="endOffset">17</int> | ||
<arr name="suggestion"> | ||
<str>difference s</str> | ||
<str>d ifferences</str> | ||
<str>differ ences</str> | ||
<str>differenc es</str> | ||
</arr> | ||
</lst> | ||
<lst name="collation"> | ||
<str name="collationQuery">audit differences</str> | ||
<int name="hits">1111</int> | ||
<lst name="misspellingsAndCorrections"> | ||
<str name="aodit">audit</str> | ||
<str name="differencex">differences</str> | ||
</lst> | ||
</lst> | ||
<lst name="collation"> | ||
<str name="collationQuery">(ao dit) differences</str> | ||
<int name="hits">1234</int> | ||
<lst name="misspellingsAndCorrections"> | ||
<str name="aodit">ao dit</str> | ||
<str name="differencex">differences</str> | ||
</lst> | ||
</lst> | ||
</lst> | ||
</lst> | ||
</response> |
53 changes: 53 additions & 0 deletions
53
SolrNet.Tests/Resources/responseWithSpellCheckingAndCollationsSolr5+.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<response> | ||
<result numFound="1" start="0"> | ||
<doc> | ||
<str name="Key">224fbdc1-12df-4520-9fbe-dd91f916eba1</str> | ||
</doc> | ||
</result> | ||
<lst name="spellcheck"> | ||
<lst name="suggestions"> | ||
<lst name="aodit"> | ||
<int name="numFound">5</int> | ||
<int name="startOffset">0</int> | ||
<int name="endOffset">5</int> | ||
<arr name="suggestion"> | ||
<str>audit</str> | ||
<str>ao dit</str> | ||
<str>addit</str> | ||
<str>a od it</str> | ||
<str>adoit</str> | ||
</arr> | ||
</lst> | ||
<lst name="differencex"> | ||
<int name="numFound">4</int> | ||
<int name="startOffset">6</int> | ||
<int name="endOffset">17</int> | ||
<arr name="suggestion"> | ||
<str>difference s</str> | ||
<str>d ifferences</str> | ||
<str>differ ences</str> | ||
<str>differenc es</str> | ||
</arr> | ||
</lst> | ||
</lst> | ||
<lst name="collations"> | ||
<lst name="collation"> | ||
<str name="collationQuery">audit differences</str> | ||
<long name="hits">1111</long> | ||
<lst name="misspellingsAndCorrections"> | ||
<str name="aodit">audit</str> | ||
<str name="differencex">differences</str> | ||
</lst> | ||
</lst> | ||
<lst name="collation"> | ||
<str name="collationQuery">(ao dit) differences</str> | ||
<long name="hits">1234</long> | ||
<lst name="misspellingsAndCorrections"> | ||
<str name="aodit">ao dit</str> | ||
<str name="differencex">differences</str> | ||
</lst> | ||
</lst> | ||
</lst> | ||
</lst> | ||
</response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#region license | ||
// Copyright (c) 2007-2010 Mauricio Scheffer | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
#endregion | ||
|
||
using System.Collections.Generic; | ||
|
||
namespace SolrNet.Impl { | ||
/// <summary> | ||
/// Collation Result | ||
/// </summary> | ||
public class CollationResult { | ||
/// <summary> | ||
/// Collation query term | ||
/// </summary> | ||
public string CollationQuery { get; set;} | ||
|
||
/// <summary> | ||
/// Number of hits | ||
/// </summary> | ||
public long Hits { get; set;} | ||
|
||
/// <summary> | ||
/// MisspellingsAndCorrections | ||
/// </summary> | ||
public IDictionary<string, string> MisspellingsAndCorrections { get; set;} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters