Merge branch 'r3.7'
This commit is contained in:
commit
beb36fdfe9
5 changed files with 103 additions and 58 deletions
|
@ -477,6 +477,9 @@ public class SearchPhrase {
|
|||
sp.unknownWords.add(unknownWords.get(i));
|
||||
}
|
||||
}
|
||||
// TODO
|
||||
// sp.rawUnknownSearchPhrase = rawUnknownSearchPhrase;
|
||||
// sp.unknownSearchPhrase = unknownSearchPhrase;
|
||||
}
|
||||
return sp;
|
||||
}
|
||||
|
|
|
@ -40,8 +40,9 @@ public class SearchResult {
|
|||
res = ObjectType.getTypeWeight(objectType);
|
||||
}
|
||||
if (parentSearchResult != null) {
|
||||
// 5 is a maximum type
|
||||
res += parentSearchResult.getUnknownPhraseMatchWeight() / 5;
|
||||
// 10 > maximum type
|
||||
// res = Math.max(res,parentSearchResult.getUnknownPhraseMatchWeight()) ;
|
||||
res += parentSearchResult.getUnknownPhraseMatchWeight() / 10;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -181,9 +181,12 @@ public class SearchUICoreTest {
|
|||
String present = result.toString();
|
||||
//System.out.println(present);
|
||||
if(!Algorithms.stringsEqual(expected, present)) {
|
||||
System.out.println(String.format("Mismatch for '%s' != '%s'. Result: ", expected, present));
|
||||
System.out.println(String.format("Mismatch for '%s' != '%s' (%d, %.3f, %s). Result: ", expected,
|
||||
present, result.getFoundWordCount(), result.getUnknownPhraseMatchWeight(), result.objectType.toString()));
|
||||
for (SearchResult r : searchResults) {
|
||||
System.out.println("\t\""+r.toString()+"\",");
|
||||
System.out.println(String.format("\t\"%s\",", r.toString()));
|
||||
// System.out.println(String.format("\"%s\", (%d, %.3f, %s),", r.toString(),
|
||||
// r.getFoundWordCount(), r.getUnknownPhraseMatchWeight(), r.objectType.toString()));
|
||||
}
|
||||
}
|
||||
Assert.assertEquals(expected, present);
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
"Spring (Spring / Natural)",
|
||||
"Spring (Ice rink / Sport)",
|
||||
"Spring (Bridge / Transport construction)",
|
||||
"Spring Street, Cold Spring Harbor",
|
||||
"Spring Street, South Nyack",
|
||||
"Spring Street, Tomkins Cove",
|
||||
"Spring Street, Southfields",
|
||||
|
@ -34,7 +35,6 @@
|
|||
"Spring Street, Montgomery",
|
||||
"Spring Street, Chelsea",
|
||||
"Spring Street, Wappingers Falls",
|
||||
"Spring Street, Cold Spring Harbor",
|
||||
"Spring Street, Staten Island",
|
||||
"Spring Street, East Meadow",
|
||||
"Spring Street, Inwood",
|
||||
|
@ -53,6 +53,44 @@
|
|||
"Spring Street, Liberty",
|
||||
"Spring Street (Livingston Manor), Rockland",
|
||||
"Spring Street, Livingston Manor",
|
||||
"Market Street, Cold Spring",
|
||||
"New Street, Cold Spring",
|
||||
"West Street, Cold Spring",
|
||||
"Fish Street, Cold Spring",
|
||||
"North Street, Cold Spring",
|
||||
"Rock Street, Cold Spring",
|
||||
"Stone Street, Cold Spring",
|
||||
"Wall Street, Cold Spring",
|
||||
"Cross Street, Cold Spring",
|
||||
"Main Street, Cold Spring",
|
||||
"Chestnut Street, Cold Spring",
|
||||
"Furnace Street, Cold Spring",
|
||||
"Garden Street, Cold Spring",
|
||||
"Church Street, Cold Spring",
|
||||
"Oak Street, Cold Spring",
|
||||
"Cherry Street, Cold Spring",
|
||||
"High Street, Cold Spring",
|
||||
"Academy Street, Cold Spring",
|
||||
"Haldane Street, Cold Spring",
|
||||
"West Bank Street, Cold Spring",
|
||||
"B Street, Cold Spring",
|
||||
"West Belvedere Street, Cold Spring",
|
||||
"Parrot Street, Cold Spring",
|
||||
"Bank Street, Cold Spring",
|
||||
"Orchard Street, Cold Spring",
|
||||
"East Belvedere Street, Cold Spring",
|
||||
"Pine Street, Cold Spring",
|
||||
"Parsonage Street, Cold Spring",
|
||||
"Hamilton Street, Cold Spring",
|
||||
"Fair Street, Cold Spring",
|
||||
"Cedar Street, Cold Spring",
|
||||
"Flora Street, Cold Spring Harbor",
|
||||
"West Main Street, Cold Spring Harbor",
|
||||
"Grove Street, Cold Spring Harbor",
|
||||
"Midland Street, Cold Spring Harbor",
|
||||
"Rusco Street, Cold Spring Harbor",
|
||||
"Main Street, Cold Spring Harbor",
|
||||
"Chestnut Street, Cold Spring Harbor",
|
||||
"Spring Street",
|
||||
"Spring Street",
|
||||
"Spring Street",
|
||||
|
|
Loading…
Reference in a new issue