Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
solarium
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
solarium
Commits
2a9ffab2
Commit
2a9ffab2
authored
Jun 04, 2012
by
Bas de Nooijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small fixes
parent
e3820935
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
16 deletions
+29
-16
library/Solarium/Query/Select/Query/Component/EDisMax.php
library/Solarium/Query/Select/Query/Component/EDisMax.php
+11
-8
library/Solarium/Query/Select/Query/Query.php
library/Solarium/Query/Select/Query/Query.php
+1
-1
library/Solarium/Query/Select/Result/Spellcheck/Result.php
library/Solarium/Query/Select/Result/Spellcheck/Result.php
+1
-1
tests/Solarium/Tests/Query/Select/Query/Component/EDisMaxTest.php
...larium/Tests/Query/Select/Query/Component/EDisMaxTest.php
+1
-1
tests/Solarium/Tests/Query/Select/RequestBuilder/RequestBuilderTest.php
.../Tests/Query/Select/RequestBuilder/RequestBuilderTest.php
+2
-2
tests/Solarium/Tests/Query/Select/Result/Spellcheck/SpellcheckTest.php
...m/Tests/Query/Select/Result/Spellcheck/SpellcheckTest.php
+13
-3
No files found.
library/Solarium/Query/Select/Query/Component/EDisMax.php
View file @
2a9ffab2
...
...
@@ -48,22 +48,25 @@ use Solarium\Query\Select\RequestBuilder\Component\DisMax as RequestBuilder;
class
EdisMax
extends
DisMax
{
/**
* Component type
*
* @var string
*/
protected
$type
=
SelectQuery
::
COMPONENT_EDISMAX
;
/**
* Default options
*
* @var array
*/
protected
$
_
options
=
array
(
protected
$options
=
array
(
'queryparser'
=>
'edismax'
,
);
/**
* Get component type
*
* @return string
*/
public
function
getType
()
{
return
SelectQuery
::
COMPONENT_EDISMAX
;
}
/**
* Set BoostFunctionsMult option
*
...
...
library/Solarium/Query/Select/Query/Query.php
View file @
2a9ffab2
...
...
@@ -146,7 +146,7 @@ class Query extends BaseQuery
protected
$componentTypes
=
array
(
self
::
COMPONENT_FACETSET
=>
'Solarium\Query\Select\Query\Component\FacetSet'
,
self
::
COMPONENT_DISMAX
=>
'Solarium\Query\Select\Query\Component\DisMax'
,
self
::
COMPONENT_EDISMAX
=>
'Solarium\Query\Select\Query\Component\EdisMax'
,
self
::
COMPONENT_EDISMAX
=>
'Solarium\Query\Select\Query\Component\EdisMax'
,
self
::
COMPONENT_MORELIKETHIS
=>
'Solarium\Query\Select\Query\Component\MoreLikeThis'
,
self
::
COMPONENT_HIGHLIGHTING
=>
'Solarium\Query\Select\Query\Component\Highlighting\Highlighting'
,
self
::
COMPONENT_GROUPING
=>
'Solarium\Query\Select\Query\Component\Grouping'
,
...
...
library/Solarium/Query/Select/Result/Spellcheck/Result.php
View file @
2a9ffab2
...
...
@@ -69,7 +69,7 @@ class Result implements \IteratorAggregate, \Countable
* Constructor
*
* @param array $suggestions
* @param
Collation $collation
* @param
array $collations
* @param boolean $correctlySpelled
* @return void
*/
...
...
tests/Solarium/Tests/Query/Select/Query/Component/EDisMaxTest.php
View file @
2a9ffab2
...
...
@@ -33,7 +33,7 @@ namespace Solarium\Tests\Query\Select\Query\Component;
use
Solarium\Query\Select\Query\Component\EdisMax
;
use
Solarium\Query\Select\Query\Query
;
class
E
D
isMaxTest
extends
\PHPUnit_Framework_TestCase
class
E
d
isMaxTest
extends
\PHPUnit_Framework_TestCase
{
/**
...
...
tests/Solarium/Tests/Query/Select/RequestBuilder/RequestBuilderTest.php
View file @
2a9ffab2
...
...
@@ -160,8 +160,8 @@ class RequestBuilderTest extends \PHPUnit_Framework_TestCase
public
function
testWithEdismaxComponent
()
{
$this
->
_query
->
getED
isMax
();
$request
=
$this
->
_builder
->
build
(
$this
->
_
query
);
$this
->
query
->
getEd
isMax
();
$request
=
$this
->
builder
->
build
(
$this
->
query
);
$this
->
assertEquals
(
'edismax'
,
...
...
tests/Solarium/Tests/Query/Select/Result/Spellcheck/SpellcheckTest.php
View file @
2a9ffab2
...
...
@@ -48,15 +48,25 @@ class SpellcheckTest extends \PHPUnit_Framework_TestCase
'key1'
=>
'content1'
,
'key2'
=>
'content2'
,
);
$this
->
collation
=
'dummy1'
;
$this
->
collation
s
=
array
(
'dummy1'
,
'dummy2'
)
;
$this
->
correctlySpelled
=
false
;
$this
->
result
=
new
Result
(
$this
->
suggestions
,
$this
->
collation
,
$this
->
correctlySpelled
);
$this
->
result
=
new
Result
(
$this
->
suggestions
,
$this
->
collation
s
,
$this
->
correctlySpelled
);
}
public
function
testGetCollation
()
{
$this
->
assertEquals
(
$this
->
collation
,
$this
->
result
->
getCollation
());
$this
->
assertEquals
(
$this
->
collations
[
1
],
$this
->
result
->
getCollation
());
}
public
function
testGetCollationWithKey
()
{
$this
->
assertEquals
(
$this
->
collations
[
0
],
$this
->
result
->
getCollation
(
0
));
}
public
function
testGetCollations
()
{
$this
->
assertEquals
(
$this
->
collations
,
$this
->
result
->
getCollations
());
}
public
function
testGetCorrectlySpelled
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment