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
c0bbb200
Commit
c0bbb200
authored
Oct 21, 2011
by
Bas de Nooijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Several improvements based on CI
parent
076c0c87
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
9 deletions
+13
-9
library/Solarium/Client/ResponseParser/Select/Component/FacetSet.php
...arium/Client/ResponseParser/Select/Component/FacetSet.php
+1
-1
library/Solarium/Configurable.php
library/Solarium/Configurable.php
+2
-3
library/Solarium/Query/Select/Component/Facet/MultiQuery.php
library/Solarium/Query/Select/Component/Facet/MultiQuery.php
+3
-4
tests/Solarium/Result/Analysis/ItemTest.php
tests/Solarium/Result/Analysis/ItemTest.php
+7
-1
No files found.
library/Solarium/Client/ResponseParser/Select/Component/FacetSet.php
View file @
c0bbb200
...
...
@@ -177,7 +177,7 @@ class Solarium_Client_ResponseParser_Select_Component_FacetSet
$offset
=
0
;
$counts
=
array
();
while
(
isset
(
$data
[
'counts'
][
$offset
])
&&
isset
(
$data
[
'counts'
][
$offset
+
1
]))
{
while
(
isset
(
$data
[
'counts'
][
$offset
])
&&
isset
(
$data
[
'counts'
][
$offset
+
1
]))
{
$counts
[
$data
[
'counts'
][
$offset
]]
=
$data
[
'counts'
][
$offset
+
1
];
$offset
+=
2
;
}
...
...
library/Solarium/Configurable.php
View file @
c0bbb200
...
...
@@ -87,7 +87,7 @@ class Solarium_Configurable
* @param array|Zend_Config $options
* @param boolean $overwrite True for overwriting existing options, false
* for merging (new values overwrite old ones if needed)
*
*
* @return void
*/
public
function
setOptions
(
$options
,
$overwrite
=
false
)
...
...
@@ -98,8 +98,7 @@ class Solarium_Configurable
if
(
is_object
(
$options
))
{
$options
=
$options
->
toArray
();
}
else
{
throw
new
Solarium_Exception
(
'Options must be an '
.
'array or a Zend_Config object'
);
throw
new
Solarium_Exception
(
'Options must be an array or a Zend_Config object'
);
}
}
...
...
library/Solarium/Query/Select/Component/Facet/MultiQuery.php
View file @
c0bbb200
...
...
@@ -66,7 +66,7 @@ class Solarium_Query_Select_Component_Facet_MultiQuery extends Solarium_Query_Se
protected
function
_init
()
{
parent
::
_init
();
foreach
(
$this
->
_options
AS
$name
=>
$value
)
{
switch
(
$name
)
{
case
'query'
:
...
...
@@ -79,7 +79,7 @@ class Solarium_Query_Select_Component_Facet_MultiQuery extends Solarium_Query_Se
/**
* Get the facet type
*
*
* @return string
*/
public
function
getType
()
...
...
@@ -133,8 +133,7 @@ class Solarium_Query_Select_Component_Facet_MultiQuery extends Solarium_Query_Se
}
if
(
array_key_exists
(
$key
,
$this
->
_facetQueries
))
{
throw
new
Solarium_Exception
(
'A query must have a unique key'
.
' value within a multiquery facet'
);
throw
new
Solarium_Exception
(
'A query must have a unique key value within a multiquery facet'
);
}
// forward shared excludes
...
...
tests/Solarium/Result/Analysis/ItemTest.php
View file @
c0bbb200
...
...
@@ -48,7 +48,8 @@ class Solarium_Result_Analysis_ItemTest extends PHPUnit_Framework_TestCase
'position'
=>
2
,
'positionHistory'
=>
array
(
2
,
1
),
'type'
=>
'<dummytype>'
,
'raw_text'
=>
'dummy raw text'
'raw_text'
=>
'dummy raw text'
,
'match'
=>
true
);
$this
->
_item
=
new
Solarium_Result_Analysis_Item
(
$this
->
_data
);
}
...
...
@@ -101,4 +102,9 @@ class Solarium_Result_Analysis_ItemTest extends PHPUnit_Framework_TestCase
$item
=
new
Solarium_Result_Analysis_Item
(
$data
);
$this
->
assertEquals
(
null
,
$item
->
getRawText
());
}
public
function
testGetMatch
()
{
$this
->
assertEquals
(
$this
->
_data
[
'match'
],
$this
->
_item
->
getMatch
());
}
}
\ No newline at end of file
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