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
f3a0db64
Commit
f3a0db64
authored
Apr 20, 2011
by
Bas de Nooijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- unittest improvements
- small bugfixes
parent
eca3407d
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
353 additions
and
4 deletions
+353
-4
library/Solarium/Query/Select.php
library/Solarium/Query/Select.php
+1
-2
library/Solarium/Query/Select/Component/Facet.php
library/Solarium/Query/Select/Component/Facet.php
+1
-0
library/Solarium/Query/Select/Component/Facet/MultiQuery.php
library/Solarium/Query/Select/Component/Facet/MultiQuery.php
+2
-2
tests/Solarium/Query/Select/Component/Facet/MultiQueryTest.php
.../Solarium/Query/Select/Component/Facet/MultiQueryTest.php
+349
-0
No files found.
library/Solarium/Query/Select.php
View file @
f3a0db64
...
@@ -615,8 +615,7 @@ class Solarium_Query_Select extends Solarium_Query
...
@@ -615,8 +615,7 @@ class Solarium_Query_Select extends Solarium_Query
*/
*/
protected
function
_createComponents
(
$configs
)
protected
function
_createComponents
(
$configs
)
{
{
foreach
(
$configs
AS
$type
=>
$config
)
foreach
(
$configs
AS
$type
=>
$config
)
{
{
$this
->
getComponent
(
$type
,
true
,
$config
);
$this
->
getComponent
(
$type
,
true
,
$config
);
}
}
}
}
...
...
library/Solarium/Query/Select/Component/Facet.php
View file @
f3a0db64
...
@@ -83,6 +83,7 @@ abstract class Solarium_Query_Select_Component_Facet extends Solarium_Configurab
...
@@ -83,6 +83,7 @@ abstract class Solarium_Query_Select_Component_Facet extends Solarium_Configurab
case
'exclude'
:
case
'exclude'
:
if
(
!
is_array
(
$value
))
$value
=
array
(
$value
);
if
(
!
is_array
(
$value
))
$value
=
array
(
$value
);
$this
->
setExcludes
(
$value
);
$this
->
setExcludes
(
$value
);
unset
(
$this
->
_options
[
'exclude'
]);
break
;
break
;
}
}
}
}
...
...
library/Solarium/Query/Select/Component/Facet/MultiQuery.php
View file @
f3a0db64
...
@@ -98,7 +98,7 @@ class Solarium_Query_Select_Component_Facet_MultiQuery extends Solarium_Query_Se
...
@@ -98,7 +98,7 @@ class Solarium_Query_Select_Component_Facet_MultiQuery extends Solarium_Query_Se
public
function
createQuery
(
$key
,
$query
,
$excludes
=
array
())
public
function
createQuery
(
$key
,
$query
,
$excludes
=
array
())
{
{
// merge excludes with shared excludes
// merge excludes with shared excludes
$excludes
=
array_merge
(
$this
->
_excludes
,
$excludes
);
$excludes
=
array_merge
(
$this
->
getExcludes
()
,
$excludes
);
$facetQuery
=
new
Solarium_Query_Select_Component_Facet_Query
;
$facetQuery
=
new
Solarium_Query_Select_Component_Facet_Query
;
$facetQuery
->
setKey
(
$key
);
$facetQuery
->
setKey
(
$key
);
...
@@ -135,7 +135,7 @@ class Solarium_Query_Select_Component_Facet_MultiQuery extends Solarium_Query_Se
...
@@ -135,7 +135,7 @@ class Solarium_Query_Select_Component_Facet_MultiQuery extends Solarium_Query_Se
}
}
// forward shared excludes
// forward shared excludes
$facetQuery
->
addExcludes
(
$this
->
_excludes
);
$facetQuery
->
addExcludes
(
$this
->
getExcludes
()
);
$this
->
_facetQueries
[
$key
]
=
$facetQuery
;
$this
->
_facetQueries
[
$key
]
=
$facetQuery
;
return
$this
;
return
$this
;
...
...
tests/Solarium/Query/Select/Component/Facet/MultiQueryTest.php
0 → 100644
View file @
f3a0db64
This diff is collapsed.
Click to expand it.
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