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
393f5678
Commit
393f5678
authored
Jun 04, 2012
by
Bas de Nooijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small merge fixes
parent
87f5f5de
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
87 deletions
+3
-87
library/Solarium/Core/Query/Helper.php
library/Solarium/Core/Query/Helper.php
+2
-2
library/Solarium/Query/Select/ResponseParser/Component/Spellcheck.php
...rium/Query/Select/ResponseParser/Component/Spellcheck.php
+1
-1
tests/Solarium/Client/RequestBuilder/Select/Component/EDisMaxTest.php
...um/Client/RequestBuilder/Select/Component/EDisMaxTest.php
+0
-84
No files found.
library/Solarium/Core/Query/Helper.php
View file @
393f5678
...
...
@@ -70,7 +70,7 @@ class Helper
protected
$derefencedParamsLastKey
=
0
;
/**
* Solarium
_
Query instance, optional.
* Solarium
Query instance, optional.
* Used for dereferenced params.
*
* @var Query
...
...
@@ -300,7 +300,7 @@ class Helper
if
(
!
$this
->
query
)
{
throw
new
Exception
(
'Dereferenced params can only be used in a Solarium
_Query_H
elper instance retrieved from the query '
'Dereferenced params can only be used in a Solarium
query h
elper instance retrieved from the query '
.
'by using the getHelper() method, this instance was manually created'
);
}
...
...
library/Solarium/Query/Select/ResponseParser/Component/Spellcheck.php
View file @
393f5678
...
...
@@ -80,7 +80,7 @@ class Spellcheck
$correctlySpelled
=
$value
;
break
;
case
'collation'
:
$collations
[]
=
$this
->
_
parseCollation
(
$value
);
$collations
[]
=
$this
->
parseCollation
(
$value
);
break
;
default
:
$suggestions
[]
=
$this
->
parseSuggestion
(
$key
,
$value
);
...
...
tests/Solarium/Client/RequestBuilder/Select/Component/EDisMaxTest.php
deleted
100644 → 0
View file @
87f5f5de
<?php
/**
* Copyright 2012 Marc Morera. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this listof conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are
* those of the authors and should not be interpreted as representing official
* policies, either expressed or implied, of the copyright holder.
*/
class
Solarium_Client_RequestBuilder_Select_Component_EDisMaxTest
extends
PHPUnit_Framework_TestCase
{
public
function
testBuildComponent
()
{
$builder
=
new
Solarium_Client_RequestBuilder_Select_Component_EDisMax
;
$request
=
new
Solarium_Client_Request
();
$component
=
new
Solarium_Query_Select_Component_EDisMax
();
$component
->
setQueryParser
(
'dummyparser'
);
$component
->
setQueryAlternative
(
'test'
);
$component
->
setQueryFields
(
'content,name'
);
$component
->
setMinimumMatch
(
'75%'
);
$component
->
setPhraseFields
(
'content,description'
);
$component
->
setPhraseSlop
(
1
);
$component
->
setPhraseBigramFields
(
'content,description,category'
);
$component
->
setPhraseBigramSlop
(
4
);
$component
->
setPhraseTrigramFields
(
'content2,date,subcategory'
);
$component
->
setPhraseTrigramSlop
(
3
);
$component
->
setQueryPhraseSlop
(
2
);
$component
->
setTie
(
0.5
);
$component
->
setBoostQuery
(
'cat:1'
);
$component
->
setBoostFunctions
(
'functionX(price)'
);
$component
->
setBoostFunctionsMult
(
'functionX(date)'
);
$component
->
setUserFields
(
'title *_s'
);
$request
=
$builder
->
buildComponent
(
$component
,
$request
);
$this
->
assertEquals
(
array
(
'defType'
=>
'dummyparser'
,
'q.alt'
=>
'test'
,
'qf'
=>
'content,name'
,
'mm'
=>
'75%'
,
'pf'
=>
'content,description'
,
'ps'
=>
1
,
'pf2'
=>
'content,description,category'
,
'ps2'
=>
4
,
'pf3'
=>
'content2,date,subcategory'
,
'ps3'
=>
3
,
'qs'
=>
2
,
'tie'
=>
0.5
,
'bq'
=>
'cat:1'
,
'bf'
=>
'functionX(price)'
,
'boost'
=>
'functionX(date)'
,
'uf'
=>
'title *_s'
,
),
$request
->
getParams
()
);
}
}
\ 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