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
daa22fce
Commit
daa22fce
authored
Sep 12, 2013
by
Dorian Villet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing everything else.
parent
43c97027
Changes
57
Show whitespace changes
Inline
Side-by-side
Showing
57 changed files
with
133 additions
and
73 deletions
+133
-73
library/Solarium/Core/Client/Adapter/Curl.php
library/Solarium/Core/Client/Adapter/Curl.php
+1
-1
library/Solarium/Core/Client/Adapter/PeclHttp.php
library/Solarium/Core/Client/Adapter/PeclHttp.php
+1
-1
library/Solarium/Core/Query/Helper.php
library/Solarium/Core/Query/Helper.php
+2
-2
library/Solarium/Core/Query/Result/QueryType.php
library/Solarium/Core/Query/Result/QueryType.php
+3
-1
library/Solarium/Plugin/Loadbalancer/Event/Events.php
library/Solarium/Plugin/Loadbalancer/Event/Events.php
+0
-1
library/Solarium/Plugin/ParallelExecution/Event/Events.php
library/Solarium/Plugin/ParallelExecution/Event/Events.php
+0
-1
library/Solarium/QueryType/Analysis/Query/Document.php
library/Solarium/QueryType/Analysis/Query/Document.php
+1
-0
library/Solarium/QueryType/Analysis/Query/Field.php
library/Solarium/QueryType/Analysis/Query/Field.php
+1
-0
library/Solarium/QueryType/Analysis/RequestBuilder/Field.php
library/Solarium/QueryType/Analysis/RequestBuilder/Field.php
+1
-0
library/Solarium/QueryType/Analysis/Result/Document.php
library/Solarium/QueryType/Analysis/Result/Document.php
+1
-0
library/Solarium/QueryType/Extract/Query.php
library/Solarium/QueryType/Extract/Query.php
+2
-1
library/Solarium/QueryType/Extract/RequestBuilder.php
library/Solarium/QueryType/Extract/RequestBuilder.php
+7
-7
library/Solarium/QueryType/MoreLikeThis/Query.php
library/Solarium/QueryType/MoreLikeThis/Query.php
+8
-2
library/Solarium/QueryType/MoreLikeThis/RequestBuilder.php
library/Solarium/QueryType/MoreLikeThis/RequestBuilder.php
+1
-0
library/Solarium/QueryType/MoreLikeThis/ResponseParser.php
library/Solarium/QueryType/MoreLikeThis/ResponseParser.php
+1
-0
library/Solarium/QueryType/MoreLikeThis/Result.php
library/Solarium/QueryType/MoreLikeThis/Result.php
+1
-0
library/Solarium/QueryType/Ping/Result.php
library/Solarium/QueryType/Ping/Result.php
+1
-0
library/Solarium/QueryType/RealtimeGet/Query.php
library/Solarium/QueryType/RealtimeGet/Query.php
+1
-0
library/Solarium/QueryType/RealtimeGet/RequestBuilder.php
library/Solarium/QueryType/RealtimeGet/RequestBuilder.php
+1
-0
library/Solarium/QueryType/Select/Query/Component/Component.php
...y/Solarium/QueryType/Select/Query/Component/Component.php
+1
-0
library/Solarium/QueryType/Select/Query/Component/Debug.php
library/Solarium/QueryType/Select/Query/Component/Debug.php
+1
-0
library/Solarium/QueryType/Select/Query/Component/DistributedSearch.php
...um/QueryType/Select/Query/Component/DistributedSearch.php
+1
-2
library/Solarium/QueryType/Select/Query/Component/Facet/Facet.php
...Solarium/QueryType/Select/Query/Component/Facet/Facet.php
+1
-0
library/Solarium/QueryType/Select/Query/Component/Facet/Pivot.php
...Solarium/QueryType/Select/Query/Component/Facet/Pivot.php
+1
-0
library/Solarium/QueryType/Select/Query/Component/Facet/Query.php
...Solarium/QueryType/Select/Query/Component/Facet/Query.php
+1
-0
library/Solarium/QueryType/Select/Query/Component/Facet/Range.php
...Solarium/QueryType/Select/Query/Component/Facet/Range.php
+9
-2
library/Solarium/QueryType/Select/Query/Component/FacetSet.php
...ry/Solarium/QueryType/Select/Query/Component/FacetSet.php
+2
-1
library/Solarium/QueryType/Select/Query/Component/Highlighting/Field.php
...m/QueryType/Select/Query/Component/Highlighting/Field.php
+1
-0
library/Solarium/QueryType/Select/Query/Component/Highlighting/Highlighting.php
...Type/Select/Query/Component/Highlighting/Highlighting.php
+4
-3
library/Solarium/QueryType/Select/Query/Component/MoreLikeThis.php
...olarium/QueryType/Select/Query/Component/MoreLikeThis.php
+6
-2
library/Solarium/QueryType/Select/Query/Component/Spellcheck.php
.../Solarium/QueryType/Select/Query/Component/Spellcheck.php
+1
-0
library/Solarium/QueryType/Select/Query/Component/Stats/Field.php
...Solarium/QueryType/Select/Query/Component/Stats/Field.php
+1
-0
library/Solarium/QueryType/Select/Query/Query.php
library/Solarium/QueryType/Select/Query/Query.php
+1
-0
library/Solarium/QueryType/Select/RequestBuilder/Component/ComponentRequestBuilderInterface.php
...estBuilder/Component/ComponentRequestBuilderInterface.php
+1
-0
library/Solarium/QueryType/Select/RequestBuilder/Component/Debug.php
...arium/QueryType/Select/RequestBuilder/Component/Debug.php
+1
-0
library/Solarium/QueryType/Select/RequestBuilder/Component/DisMax.php
...rium/QueryType/Select/RequestBuilder/Component/DisMax.php
+1
-0
library/Solarium/QueryType/Select/RequestBuilder/Component/DistributedSearch.php
...ype/Select/RequestBuilder/Component/DistributedSearch.php
+1
-0
library/Solarium/QueryType/Select/RequestBuilder/Component/Grouping.php
...um/QueryType/Select/RequestBuilder/Component/Grouping.php
+1
-0
library/Solarium/QueryType/Select/RequestBuilder/Component/MoreLikeThis.php
...ueryType/Select/RequestBuilder/Component/MoreLikeThis.php
+5
-1
library/Solarium/QueryType/Select/RequestBuilder/Component/Spellcheck.php
.../QueryType/Select/RequestBuilder/Component/Spellcheck.php
+2
-1
library/Solarium/QueryType/Select/RequestBuilder/RequestBuilder.php
...larium/QueryType/Select/RequestBuilder/RequestBuilder.php
+8
-4
library/Solarium/QueryType/Select/ResponseParser/Component/ComponentParserInterface.php
...ect/ResponseParser/Component/ComponentParserInterface.php
+1
-0
library/Solarium/QueryType/Select/ResponseParser/Component/FacetSet.php
...um/QueryType/Select/ResponseParser/Component/FacetSet.php
+4
-1
library/Solarium/QueryType/Select/ResponseParser/Component/Grouping.php
...um/QueryType/Select/ResponseParser/Component/Grouping.php
+4
-9
library/Solarium/QueryType/Select/ResponseParser/Component/MoreLikeThis.php
...ueryType/Select/ResponseParser/Component/MoreLikeThis.php
+1
-0
library/Solarium/QueryType/Select/ResponseParser/Component/Spellcheck.php
.../QueryType/Select/ResponseParser/Component/Spellcheck.php
+5
-8
library/Solarium/QueryType/Select/ResponseParser/Component/Stats.php
...arium/QueryType/Select/ResponseParser/Component/Stats.php
+2
-3
library/Solarium/QueryType/Select/ResponseParser/ResponseParser.php
...larium/QueryType/Select/ResponseParser/ResponseParser.php
+4
-1
library/Solarium/QueryType/Select/Result/Highlighting/Highlighting.php
...ium/QueryType/Select/Result/Highlighting/Highlighting.php
+1
-0
library/Solarium/QueryType/Select/Result/MoreLikeThis/MoreLikeThis.php
...ium/QueryType/Select/Result/MoreLikeThis/MoreLikeThis.php
+1
-0
library/Solarium/QueryType/Select/Result/Result.php
library/Solarium/QueryType/Select/Result/Result.php
+1
-0
library/Solarium/QueryType/Suggester/Query.php
library/Solarium/QueryType/Suggester/Query.php
+1
-0
library/Solarium/QueryType/Suggester/RequestBuilder.php
library/Solarium/QueryType/Suggester/RequestBuilder.php
+1
-0
library/Solarium/QueryType/Suggester/Result/Result.php
library/Solarium/QueryType/Suggester/Result/Result.php
+1
-0
library/Solarium/QueryType/Terms/Query.php
library/Solarium/QueryType/Terms/Query.php
+8
-2
library/Solarium/QueryType/Terms/RequestBuilder.php
library/Solarium/QueryType/Terms/RequestBuilder.php
+1
-0
library/Solarium/QueryType/Update/Query/Query.php
library/Solarium/QueryType/Update/Query/Query.php
+12
-16
No files found.
library/Solarium/Core/Client/Adapter/Curl.php
View file @
daa22fce
...
@@ -163,7 +163,7 @@ class Curl extends Configurable implements AdapterInterface
...
@@ -163,7 +163,7 @@ class Curl extends Configurable implements AdapterInterface
}
}
if
(
!
empty
(
$authData
[
'username'
])
&&
!
empty
(
$authData
[
'password'
]))
{
if
(
!
empty
(
$authData
[
'username'
])
&&
!
empty
(
$authData
[
'password'
]))
{
curl_setopt
(
$handler
,
CURLOPT_USERPWD
,
$authData
[
'username'
]
.
':'
.
$authData
[
'password'
]
);
curl_setopt
(
$handler
,
CURLOPT_USERPWD
,
$authData
[
'username'
]
.
':'
.
$authData
[
'password'
]);
curl_setopt
(
$handler
,
CURLOPT_HTTPAUTH
,
CURLAUTH_BASIC
);
curl_setopt
(
$handler
,
CURLOPT_HTTPAUTH
,
CURLAUTH_BASIC
);
}
}
...
...
library/Solarium/Core/Client/Adapter/PeclHttp.php
View file @
daa22fce
...
@@ -158,7 +158,7 @@ class PeclHttp extends Configurable implements AdapterInterface
...
@@ -158,7 +158,7 @@ class PeclHttp extends Configurable implements AdapterInterface
}
}
if
(
!
empty
(
$authData
[
'username'
])
&&
!
empty
(
$authData
[
'password'
]))
{
if
(
!
empty
(
$authData
[
'username'
])
&&
!
empty
(
$authData
[
'password'
]))
{
$headers
[
'Authorization'
]
=
'Basic '
.
base64_encode
(
$authData
[
'username'
]
.
':'
.
$authData
[
'password'
]
);
$headers
[
'Authorization'
]
=
'Basic '
.
base64_encode
(
$authData
[
'username'
]
.
':'
.
$authData
[
'password'
]);
}
}
switch
(
$request
->
getMethod
())
{
switch
(
$request
->
getMethod
())
{
...
...
library/Solarium/Core/Query/Helper.php
View file @
daa22fce
...
@@ -343,7 +343,7 @@ class Helper
...
@@ -343,7 +343,7 @@ class Helper
public
function
functionCall
(
$name
,
$params
=
array
(),
$dereferenced
=
false
)
public
function
functionCall
(
$name
,
$params
=
array
(),
$dereferenced
=
false
)
{
{
if
(
$dereferenced
)
{
if
(
$dereferenced
)
{
foreach
(
$params
as
$key
=>
$value
)
{
foreach
(
$params
as
$key
=>
$value
)
{
$this
->
query
->
addParam
(
$key
,
$value
);
$this
->
query
->
addParam
(
$key
,
$value
);
}
}
return
$name
.
'()'
;
return
$name
.
'()'
;
...
@@ -448,7 +448,7 @@ class Helper
...
@@ -448,7 +448,7 @@ class Helper
*/
*/
public
function
qparserTerm
(
$field
,
$weight
)
public
function
qparserTerm
(
$field
,
$weight
)
{
{
return
$this
->
qparser
(
'term'
,
array
(
'f'
=>
$field
))
.
$weight
;
return
$this
->
qparser
(
'term'
,
array
(
'f'
=>
$field
))
.
$weight
;
}
}
/**
/**
...
...
library/Solarium/Core/Query/Result/QueryType.php
View file @
daa22fce
...
@@ -67,7 +67,9 @@ class QueryType extends Result
...
@@ -67,7 +67,9 @@ class QueryType extends Result
$responseParser
=
$this
->
query
->
getResponseParser
();
$responseParser
=
$this
->
query
->
getResponseParser
();
if
(
!
$responseParser
||
!
(
$responseParser
instanceof
ResponseParserInterface
))
{
if
(
!
$responseParser
||
!
(
$responseParser
instanceof
ResponseParserInterface
))
{
throw
new
UnexpectedValueException
(
'No responseparser returned by querytype: '
.
$this
->
query
->
getType
());
throw
new
UnexpectedValueException
(
'No responseparser returned by querytype: '
.
$this
->
query
->
getType
()
);
}
}
$this
->
mapData
(
$responseParser
->
parse
(
$this
));
$this
->
mapData
(
$responseParser
->
parse
(
$this
));
...
...
library/Solarium/Plugin/Loadbalancer/Event/Events.php
View file @
daa22fce
...
@@ -51,5 +51,4 @@ class Events
...
@@ -51,5 +51,4 @@ class Events
* @var string
* @var string
*/
*/
const
ENDPOINT_FAILURE
=
'solarium.loadbalancer.endpointFailure'
;
const
ENDPOINT_FAILURE
=
'solarium.loadbalancer.endpointFailure'
;
}
}
library/Solarium/Plugin/ParallelExecution/Event/Events.php
View file @
daa22fce
...
@@ -60,5 +60,4 @@ class Events
...
@@ -60,5 +60,4 @@ class Events
* @var string
* @var string
*/
*/
const
EXECUTE_END
=
'solarium.parallelExecution.executeEnd'
;
const
EXECUTE_END
=
'solarium.parallelExecution.executeEnd'
;
}
}
library/Solarium/QueryType/Analysis/Query/Document.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Analysis\Query
;
namespace
Solarium\QueryType\Analysis\Query
;
use
Solarium\Core\Client\Client
;
use
Solarium\Core\Client\Client
;
use
Solarium\Exception\RuntimeException
;
use
Solarium\Exception\RuntimeException
;
use
Solarium\QueryType\Analysis\ResponseParser\Document
as
ResponseParser
;
use
Solarium\QueryType\Analysis\ResponseParser\Document
as
ResponseParser
;
...
...
library/Solarium/QueryType/Analysis/Query/Field.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Analysis\Query
;
namespace
Solarium\QueryType\Analysis\Query
;
use
Solarium\Core\Client\Client
;
use
Solarium\Core\Client\Client
;
use
Solarium\QueryType\Analysis\ResponseParser\Field
as
ResponseParser
;
use
Solarium\QueryType\Analysis\ResponseParser\Field
as
ResponseParser
;
use
Solarium\QueryType\Analysis\RequestBuilder\Field
as
RequestBuilder
;
use
Solarium\QueryType\Analysis\RequestBuilder\Field
as
RequestBuilder
;
...
...
library/Solarium/QueryType/Analysis/RequestBuilder/Field.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Analysis\RequestBuilder
;
namespace
Solarium\QueryType\Analysis\RequestBuilder
;
use
Solarium\QueryType\Analysis\Query\Field
as
QueryField
;
use
Solarium\QueryType\Analysis\Query\Field
as
QueryField
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Query\QueryInterface
;
use
Solarium\Core\Query\QueryInterface
;
...
...
library/Solarium/QueryType/Analysis/Result/Document.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Analysis\Result
;
namespace
Solarium\QueryType\Analysis\Result
;
use
Solarium\Core\Query\Result\QueryType
as
BaseResult
;
use
Solarium\Core\Query\Result\QueryType
as
BaseResult
;
use
Solarium\QueryType\Analysis\Result\ResultList
;
use
Solarium\QueryType\Analysis\Result\ResultList
;
...
...
library/Solarium/QueryType/Extract/Query.php
View file @
daa22fce
...
@@ -42,6 +42,7 @@
...
@@ -42,6 +42,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Extract
;
namespace
Solarium\QueryType\Extract
;
use
Solarium\Core\Query\Query
as
BaseQuery
;
use
Solarium\Core\Query\Query
as
BaseQuery
;
use
Solarium\Core\Client\Client
;
use
Solarium\Core\Client\Client
;
use
Solarium\QueryType\Update\ResponseParser
as
UpdateResponseParser
;
use
Solarium\QueryType\Update\ResponseParser
as
UpdateResponseParser
;
...
@@ -303,7 +304,7 @@ class Query extends BaseQuery
...
@@ -303,7 +304,7 @@ class Query extends BaseQuery
*/
*/
public
function
addFieldMappings
(
$mappings
)
public
function
addFieldMappings
(
$mappings
)
{
{
foreach
(
$mappings
AS
$fromField
=>
$toField
)
{
foreach
(
$mappings
as
$fromField
=>
$toField
)
{
$this
->
addFieldMapping
(
$fromField
,
$toField
);
$this
->
addFieldMapping
(
$fromField
,
$toField
);
}
}
...
...
library/Solarium/QueryType/Extract/RequestBuilder.php
View file @
daa22fce
...
@@ -76,7 +76,7 @@ class RequestBuilder extends BaseRequestBuilder
...
@@ -76,7 +76,7 @@ class RequestBuilder extends BaseRequestBuilder
$request
->
addParam
(
'lowernames'
,
$query
->
getLowernames
());
$request
->
addParam
(
'lowernames'
,
$query
->
getLowernames
());
$request
->
addParam
(
'defaultField'
,
$query
->
getDefaultField
());
$request
->
addParam
(
'defaultField'
,
$query
->
getDefaultField
());
foreach
(
$query
->
getFieldMappings
()
AS
$fromField
=>
$toField
)
{
foreach
(
$query
->
getFieldMappings
()
as
$fromField
=>
$toField
)
{
$request
->
addParam
(
'fmap.'
.
$fromField
,
$toField
);
$request
->
addParam
(
'fmap.'
.
$fromField
,
$toField
);
}
}
...
@@ -87,15 +87,15 @@ class RequestBuilder extends BaseRequestBuilder
...
@@ -87,15 +87,15 @@ class RequestBuilder extends BaseRequestBuilder
}
}
// literal.*
// literal.*
foreach
(
$doc
->
getFields
()
AS
$name
=>
$value
)
{
foreach
(
$doc
->
getFields
()
as
$name
=>
$value
)
{
$value
=
(
array
)
$value
;
$value
=
(
array
)
$value
;
foreach
(
$value
AS
$multival
)
{
foreach
(
$value
as
$multival
)
{
$request
->
addParam
(
'literal.'
.
$name
,
$multival
);
$request
->
addParam
(
'literal.'
.
$name
,
$multival
);
}
}
}
}
// boost.*
// boost.*
foreach
(
$doc
->
getFieldBoosts
()
AS
$name
=>
$value
)
{
foreach
(
$doc
->
getFieldBoosts
()
as
$name
=>
$value
)
{
$request
->
addParam
(
'boost.'
.
$name
,
$value
);
$request
->
addParam
(
'boost.'
.
$name
,
$value
);
}
}
}
}
...
...
library/Solarium/QueryType/MoreLikeThis/Query.php
View file @
daa22fce
...
@@ -203,7 +203,10 @@ class Query extends SelectQuery
...
@@ -203,7 +203,10 @@ class Query extends SelectQuery
public
function
getMltFields
()
public
function
getMltFields
()
{
{
$value
=
$this
->
getOption
(
'mltfields'
);
$value
=
$this
->
getOption
(
'mltfields'
);
if
(
$value
===
null
)
$value
=
array
();
if
(
$value
===
null
)
{
$value
=
array
();
}
return
$value
;
return
$value
;
}
}
...
@@ -401,7 +404,10 @@ class Query extends SelectQuery
...
@@ -401,7 +404,10 @@ class Query extends SelectQuery
public
function
getQueryFields
()
public
function
getQueryFields
()
{
{
$value
=
$this
->
getOption
(
'queryfields'
);
$value
=
$this
->
getOption
(
'queryfields'
);
if
(
$value
===
null
)
$value
=
array
();
if
(
$value
===
null
)
{
$value
=
array
();
}
return
$value
;
return
$value
;
}
}
}
}
library/Solarium/QueryType/MoreLikeThis/RequestBuilder.php
View file @
daa22fce
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\MoreLikeThis
;
namespace
Solarium\QueryType\MoreLikeThis
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Client\Request
;
use
Solarium\QueryType\Select\RequestBuilder\RequestBuilder
as
SelectRequestBuilder
;
use
Solarium\QueryType\Select\RequestBuilder\RequestBuilder
as
SelectRequestBuilder
;
use
Solarium\Core\Query\QueryInterface
;
use
Solarium\Core\Query\QueryInterface
;
...
...
library/Solarium/QueryType/MoreLikeThis/ResponseParser.php
View file @
daa22fce
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\MoreLikeThis
;
namespace
Solarium\QueryType\MoreLikeThis
;
use
Solarium\QueryType\Select\ResponseParser\ResponseParser
as
SelectResponseParser
;
use
Solarium\QueryType\Select\ResponseParser\ResponseParser
as
SelectResponseParser
;
/**
/**
...
...
library/Solarium/QueryType/MoreLikeThis/Result.php
View file @
daa22fce
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\MoreLikeThis
;
namespace
Solarium\QueryType\MoreLikeThis
;
use
Solarium\QueryType\Select\Result\Document
as
ReadOnlyDocument
;
use
Solarium\QueryType\Select\Result\Document
as
ReadOnlyDocument
;
use
Solarium\QueryType\Select\Result\Result
as
SelectResult
;
use
Solarium\QueryType\Select\Result\Result
as
SelectResult
;
use
Solarium\Exception\UnexpectedValueException
;
use
Solarium\Exception\UnexpectedValueException
;
...
...
library/Solarium/QueryType/Ping/Result.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Ping
;
namespace
Solarium\QueryType\Ping
;
use
Solarium\Core\Query\Result\Result
as
BaseResult
;
use
Solarium\Core\Query\Result\Result
as
BaseResult
;
/**
/**
...
...
library/Solarium/QueryType/RealtimeGet/Query.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\RealtimeGet
;
namespace
Solarium\QueryType\RealtimeGet
;
use
Solarium\Core\Query\Query
as
BaseQuery
;
use
Solarium\Core\Query\Query
as
BaseQuery
;
use
Solarium\Core\Client\Client
;
use
Solarium\Core\Client\Client
;
use
Solarium\QueryType\RealtimeGet\RequestBuilder
as
RequestBuilder
;
use
Solarium\QueryType\RealtimeGet\RequestBuilder
as
RequestBuilder
;
...
...
library/Solarium/QueryType/RealtimeGet/RequestBuilder.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\RealtimeGet
;
namespace
Solarium\QueryType\RealtimeGet
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Query\RequestBuilder
as
BaseRequestBuilder
;
use
Solarium\Core\Query\RequestBuilder
as
BaseRequestBuilder
;
use
Solarium\Core\Query\QueryInterface
;
use
Solarium\Core\Query\QueryInterface
;
...
...
library/Solarium/QueryType/Select/Query/Component/Component.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\Query\Component
;
namespace
Solarium\QueryType\Select\Query\Component
;
use
Solarium\Core\Configurable
;
use
Solarium\Core\Configurable
;
use
Solarium\Core\Query\Query
;
use
Solarium\Core\Query\Query
;
use
Solarium\QueryType\Select\ResponseParser\Component\ComponentParserInterface
;
use
Solarium\QueryType\Select\ResponseParser\Component\ComponentParserInterface
;
...
...
library/Solarium/QueryType/Select/Query/Component/Debug.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\Query\Component
;
namespace
Solarium\QueryType\Select\Query\Component
;
use
Solarium\QueryType\Select\Query\Query
as
SelectQuery
;
use
Solarium\QueryType\Select\Query\Query
as
SelectQuery
;
use
Solarium\QueryType\Select\RequestBuilder\Component\Debug
as
RequestBuilder
;
use
Solarium\QueryType\Select\RequestBuilder\Component\Debug
as
RequestBuilder
;
use
Solarium\QueryType\Select\ResponseParser\Component\Debug
as
ResponseParser
;
use
Solarium\QueryType\Select\ResponseParser\Component\Debug
as
ResponseParser
;
...
...
library/Solarium/QueryType/Select/Query/Component/DistributedSearch.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\Query\Component
;
namespace
Solarium\QueryType\Select\Query\Component
;
use
Solarium\QueryType\Select\Query\Query
as
SelectQuery
;
use
Solarium\QueryType\Select\Query\Query
as
SelectQuery
;
use
Solarium\QueryType\Select\RequestBuilder\Component\DistributedSearch
as
RequestBuilder
;
use
Solarium\QueryType\Select\RequestBuilder\Component\DistributedSearch
as
RequestBuilder
;
...
@@ -327,6 +328,4 @@ class DistributedSearch extends Component
...
@@ -327,6 +328,4 @@ class DistributedSearch extends Component
{
{
return
$this
->
collections
;
return
$this
->
collections
;
}
}
}
}
library/Solarium/QueryType/Select/Query/Component/Facet/Facet.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\Query\Component\Facet
;
namespace
Solarium\QueryType\Select\Query\Component\Facet
;
use
Solarium\Core\Configurable
;
use
Solarium\Core\Configurable
;
/**
/**
...
...
library/Solarium/QueryType/Select/Query/Component/Facet/Pivot.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\Query\Component\Facet
;
namespace
Solarium\QueryType\Select\Query\Component\Facet
;
use
Solarium\QueryType\Select\Query\Component\FacetSet
;
use
Solarium\QueryType\Select\Query\Component\FacetSet
;
/**
/**
...
...
library/Solarium/QueryType/Select/Query/Component/Facet/Query.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\Query\Component\Facet
;
namespace
Solarium\QueryType\Select\Query\Component\Facet
;
use
Solarium\QueryType\Select\Query\Component\FacetSet
;
use
Solarium\QueryType\Select\Query\Component\FacetSet
;
use
Solarium\Core\Query\Helper
;
use
Solarium\Core\Query\Helper
;
...
...
library/Solarium/QueryType/Select/Query/Component/Facet/Range.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\Query\Component\Facet
;
namespace
Solarium\QueryType\Select\Query\Component\Facet
;
use
Solarium\QueryType\Select\Query\Component\FacetSet
;
use
Solarium\QueryType\Select\Query\Component\FacetSet
;
/**
/**
...
@@ -269,7 +270,10 @@ class Range extends Facet
...
@@ -269,7 +270,10 @@ class Range extends Facet
public
function
getOther
()
public
function
getOther
()
{
{
$other
=
$this
->
getOption
(
'other'
);
$other
=
$this
->
getOption
(
'other'
);
if
(
$other
===
null
)
$other
=
array
();
if
(
$other
===
null
)
{
$other
=
array
();
}
return
$other
;
return
$other
;
}
}
...
@@ -300,7 +304,10 @@ class Range extends Facet
...
@@ -300,7 +304,10 @@ class Range extends Facet
public
function
getInclude
()
public
function
getInclude
()
{
{
$include
=
$this
->
getOption
(
'include'
);
$include
=
$this
->
getOption
(
'include'
);
if
(
$include
===
null
)
$include
=
array
();
if
(
$include
===
null
)
{
$include
=
array
();
}
return
$include
;
return
$include
;
}
}
}
}
library/Solarium/QueryType/Select/Query/Component/FacetSet.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\Query\Component
;
namespace
Solarium\QueryType\Select\Query\Component
;
use
Solarium\QueryType\Select\Query\Query
as
SelectQuery
;
use
Solarium\QueryType\Select\Query\Query
as
SelectQuery
;
use
Solarium\QueryType\Select\RequestBuilder\Component\FacetSet
as
RequestBuilder
;
use
Solarium\QueryType\Select\RequestBuilder\Component\FacetSet
as
RequestBuilder
;
use
Solarium\QueryType\Select\ResponseParser\Component\FacetSet
as
ResponseParser
;
use
Solarium\QueryType\Select\ResponseParser\Component\FacetSet
as
ResponseParser
;
...
@@ -144,7 +145,7 @@ class FacetSet extends Component
...
@@ -144,7 +145,7 @@ class FacetSet extends Component
protected
function
init
()
protected
function
init
()
{
{
if
(
isset
(
$this
->
options
[
'facet'
]))
{
if
(
isset
(
$this
->
options
[
'facet'
]))
{
foreach
(
$this
->
options
[
'facet'
]
AS
$key
=>
$config
)
{
foreach
(
$this
->
options
[
'facet'
]
as
$key
=>
$config
)
{
if
(
!
isset
(
$config
[
'key'
]))
{
if
(
!
isset
(
$config
[
'key'
]))
{
$config
[
'key'
]
=
$key
;
$config
[
'key'
]
=
$key
;
}
}
...
...
library/Solarium/QueryType/Select/Query/Component/Highlighting/Field.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\Query\Component\Highlighting
;
namespace
Solarium\QueryType\Select\Query\Component\Highlighting
;
use
Solarium\Core\Configurable
;
use
Solarium\Core\Configurable
;
/**
/**
...
...
library/Solarium/QueryType/Select/Query/Component/Highlighting/Highlighting.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\Query\Component\Highlighting
;
namespace
Solarium\QueryType\Select\Query\Component\Highlighting
;
use
Solarium\QueryType\Select\Query\Query
as
SelectQuery
;
use
Solarium\QueryType\Select\Query\Query
as
SelectQuery
;
use
Solarium\QueryType\Select\Query\Component\Component
;
use
Solarium\QueryType\Select\Query\Component\Component
;
use
Solarium\QueryType\Select\RequestBuilder\Component\Highlighting
as
RequestBuilder
;
use
Solarium\QueryType\Select\RequestBuilder\Component\Highlighting
as
RequestBuilder
;
...
@@ -173,7 +174,9 @@ class Highlighting extends Component
...
@@ -173,7 +174,9 @@ class Highlighting extends Component
// validate field
// validate field
if
(
$field
->
getName
()
===
null
)
{
if
(
$field
->
getName
()
===
null
)
{
throw
new
InvalidArgumentException
(
'To add a highlighting field it needs to have at least a "name" setting'
);
throw
new
InvalidArgumentException
(
'To add a highlighting field it needs to have at least a "name" setting'
);
}
}
$this
->
fields
[
$field
->
getName
()]
=
$field
;
$this
->
fields
[
$field
->
getName
()]
=
$field
;
...
@@ -898,6 +901,4 @@ class Highlighting extends Component
...
@@ -898,6 +901,4 @@ class Highlighting extends Component
{
{
return
$this
->
getOption
(
'boundaryscannercountry'
);
return
$this
->
getOption
(
'boundaryscannercountry'
);
}
}
}
}
library/Solarium/QueryType/Select/Query/Component/MoreLikeThis.php
View file @
daa22fce
...
@@ -108,7 +108,9 @@ class MoreLikeThis extends Component
...
@@ -108,7 +108,9 @@ class MoreLikeThis extends Component
public
function
getFields
()
public
function
getFields
()
{
{
$fields
=
$this
->
getOption
(
'fields'
);
$fields
=
$this
->
getOption
(
'fields'
);
if
(
$fields
==
null
)
$fields
=
array
();
if
(
$fields
==
null
)
{
$fields
=
array
();
}
return
$fields
;
return
$fields
;
}
}
...
@@ -307,7 +309,9 @@ class MoreLikeThis extends Component
...
@@ -307,7 +309,9 @@ class MoreLikeThis extends Component
public
function
getQueryFields
()
public
function
getQueryFields
()
{
{
$queryfields
=
$this
->
getOption
(
'queryfields'
);
$queryfields
=
$this
->
getOption
(
'queryfields'
);
if
(
$queryfields
==
null
)
$queryfields
=
array
();
if
(
$queryfields
==
null
)
{
$queryfields
=
array
();
}
return
$queryfields
;
return
$queryfields
;
}
}
...
...
library/Solarium/QueryType/Select/Query/Component/Spellcheck.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\Query\Component
;
namespace
Solarium\QueryType\Select\Query\Component
;
use
Solarium\QueryType\Select\Query\Query
as
SelectQuery
;
use
Solarium\QueryType\Select\Query\Query
as
SelectQuery
;
use
Solarium\QueryType\Select\RequestBuilder\Component\Spellcheck
as
RequestBuilder
;
use
Solarium\QueryType\Select\RequestBuilder\Component\Spellcheck
as
RequestBuilder
;
use
Solarium\QueryType\Select\ResponseParser\Component\Spellcheck
as
ResponseParser
;
use
Solarium\QueryType\Select\ResponseParser\Component\Spellcheck
as
ResponseParser
;
...
...
library/Solarium/QueryType/Select/Query/Component/Stats/Field.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\Query\Component\Stats
;
namespace
Solarium\QueryType\Select\Query\Component\Stats
;
use
Solarium\Core\Configurable
;
use
Solarium\Core\Configurable
;
/**
/**
...
...
library/Solarium/QueryType/Select/Query/Query.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\Query
;
namespace
Solarium\QueryType\Select\Query
;
use
Solarium\Core\Client\Client
;
use
Solarium\Core\Client\Client
;
use
Solarium\Core\Query\Query
as
BaseQuery
;
use
Solarium\Core\Query\Query
as
BaseQuery
;
use
Solarium\QueryType\Select\RequestBuilder\RequestBuilder
;
use
Solarium\QueryType\Select\RequestBuilder\RequestBuilder
;
...
...
library/Solarium/QueryType/Select/RequestBuilder/Component/ComponentRequestBuilderInterface.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\RequestBuilder\Component
;
namespace
Solarium\QueryType\Select\RequestBuilder\Component
;
use
Solarium\QueryType\Select\Query\Component\Component
;
use
Solarium\QueryType\Select\Query\Component\Component
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Client\Request
;
...
...
library/Solarium/QueryType/Select/RequestBuilder/Component/Debug.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\RequestBuilder\Component
;
namespace
Solarium\QueryType\Select\RequestBuilder\Component
;
use
Solarium\QueryType\Select\Query\Component\Debug
as
DebugComponent
;
use
Solarium\QueryType\Select\Query\Component\Debug
as
DebugComponent
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Client\Request
;
...
...
library/Solarium/QueryType/Select/RequestBuilder/Component/DisMax.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\RequestBuilder\Component
;
namespace
Solarium\QueryType\Select\RequestBuilder\Component
;
use
Solarium\QueryType\Select\Query\Component\Dismax
as
DismaxComponent
;
use
Solarium\QueryType\Select\Query\Component\Dismax
as
DismaxComponent
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Client\Request
;
...
...
library/Solarium/QueryType/Select/RequestBuilder/Component/DistributedSearch.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\RequestBuilder\Component
;
namespace
Solarium\QueryType\Select\RequestBuilder\Component
;
use
Solarium\QueryType\Select\Query\Component\DistributedSearch
as
DistributedSearchComponent
;
use
Solarium\QueryType\Select\Query\Component\DistributedSearch
as
DistributedSearchComponent
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Client\Request
;
...
...
library/Solarium/QueryType/Select/RequestBuilder/Component/Grouping.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\RequestBuilder\Component
;
namespace
Solarium\QueryType\Select\RequestBuilder\Component
;
use
Solarium\QueryType\Select\Query\Component\Grouping
as
GroupingComponent
;
use
Solarium\QueryType\Select\Query\Component\Grouping
as
GroupingComponent
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Client\Request
;
...
...
library/Solarium/QueryType/Select/RequestBuilder/Component/MoreLikeThis.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\RequestBuilder\Component
;
namespace
Solarium\QueryType\Select\RequestBuilder\Component
;
use
Solarium\QueryType\Select\Query\Component\MoreLikeThis
as
MoreLikeThisComponent
;
use
Solarium\QueryType\Select\Query\Component\MoreLikeThis
as
MoreLikeThisComponent
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Client\Request
;
...
@@ -65,7 +66,10 @@ class MoreLikeThis implements ComponentRequestBuilderInterface
...
@@ -65,7 +66,10 @@ class MoreLikeThis implements ComponentRequestBuilderInterface
$request
->
addParam
(
'mlt.maxqt'
,
$component
->
getMaximumQueryTerms
());
$request
->
addParam
(
'mlt.maxqt'
,
$component
->
getMaximumQueryTerms
());
$request
->
addParam
(
'mlt.maxntp'
,
$component
->
getMaximumNumberOfTokens
());
$request
->
addParam
(
'mlt.maxntp'
,
$component
->
getMaximumNumberOfTokens
());
$request
->
addParam
(
'mlt.boost'
,
$component
->
getBoost
());
$request
->
addParam
(
'mlt.boost'
,
$component
->
getBoost
());
$request
->
addParam
(
'mlt.qf'
,
count
(
$component
->
getQueryFields
())
?
implode
(
','
,
$component
->
getQueryFields
())
:
null
);
$request
->
addParam
(
'mlt.qf'
,
count
(
$component
->
getQueryFields
())
?
implode
(
','
,
$component
->
getQueryFields
())
:
null
);
$request
->
addParam
(
'mlt.count'
,
$component
->
getCount
());
$request
->
addParam
(
'mlt.count'
,
$component
->
getCount
());
return
$request
;
return
$request
;
...
...
library/Solarium/QueryType/Select/RequestBuilder/Component/Spellcheck.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\RequestBuilder\Component
;
namespace
Solarium\QueryType\Select\RequestBuilder\Component
;
use
Solarium\QueryType\Select\Query\Component\Spellcheck
as
SpellcheckComponent
;
use
Solarium\QueryType\Select\Query\Component\Spellcheck
as
SpellcheckComponent
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Client\Request
;
...
@@ -71,7 +72,7 @@ class Spellcheck implements ComponentRequestBuilderInterface
...
@@ -71,7 +72,7 @@ class Spellcheck implements ComponentRequestBuilderInterface
$request
->
addParam
(
'spellcheck.collateExtendedResults'
,
$component
->
getCollateExtendedResults
());
$request
->
addParam
(
'spellcheck.collateExtendedResults'
,
$component
->
getCollateExtendedResults
());
$request
->
addParam
(
'spellcheck.accuracy'
,
$component
->
getAccuracy
());
$request
->
addParam
(
'spellcheck.accuracy'
,
$component
->
getAccuracy
());
foreach
(
$component
->
getCollateParams
()
as
$param
=>
$value
)
{
foreach
(
$component
->
getCollateParams
()
as
$param
=>
$value
)
{
$request
->
addParam
(
'spellcheck.collateParam.'
.
$param
,
$value
);
$request
->
addParam
(
'spellcheck.collateParam.'
.
$param
,
$value
);
}
}
...
...
library/Solarium/QueryType/Select/RequestBuilder/RequestBuilder.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\RequestBuilder
;
namespace
Solarium\QueryType\Select\RequestBuilder
;
use
Solarium\QueryType\Select\Query\Query
as
SelectQuery
;
use
Solarium\QueryType\Select\Query\Query
as
SelectQuery
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Query\RequestBuilder
as
BaseRequestBuilder
;
use
Solarium\Core\Query\RequestBuilder
as
BaseRequestBuilder
;
...
@@ -58,10 +59,13 @@ class RequestBuilder extends BaseRequestBuilder
...
@@ -58,10 +59,13 @@ class RequestBuilder extends BaseRequestBuilder
$request
=
parent
::
build
(
$query
);
$request
=
parent
::
build
(
$query
);
// add basic params to request
// add basic params to request
$request
->
addParam
(
'q'
,
$this
->
renderLocalParams
(
$request
->
addParam
(
'q'
,
$this
->
renderLocalParams
(
$query
->
getQuery
(),
$query
->
getQuery
(),
array
(
'tag'
=>
$query
->
getTags
())
array
(
'tag'
=>
$query
->
getTags
())
));
)
);
$request
->
addParam
(
'start'
,
$query
->
getStart
());
$request
->
addParam
(
'start'
,
$query
->
getStart
());
$request
->
addParam
(
'rows'
,
$query
->
getRows
());
$request
->
addParam
(
'rows'
,
$query
->
getRows
());
$request
->
addParam
(
'fl'
,
implode
(
','
,
$query
->
getFields
()));
$request
->
addParam
(
'fl'
,
implode
(
','
,
$query
->
getFields
()));
...
...
library/Solarium/QueryType/Select/ResponseParser/Component/ComponentParserInterface.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\ResponseParser\Component
;
namespace
Solarium\QueryType\Select\ResponseParser\Component
;
use
Solarium\QueryType\Select\Query\Query
;
use
Solarium\QueryType\Select\Query\Query
;
interface
ComponentParserInterface
interface
ComponentParserInterface
...
...
library/Solarium/QueryType/Select/ResponseParser/Component/FacetSet.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\ResponseParser\Component
;
namespace
Solarium\QueryType\Select\ResponseParser\Component
;
use
Solarium\QueryType\Select\Query\Query
;
use
Solarium\QueryType\Select\Query\Query
;
use
Solarium\QueryType\Select\Query\Component\FacetSet
as
QueryFacetSet
;
use
Solarium\QueryType\Select\Query\Component\FacetSet
as
QueryFacetSet
;
use
Solarium\QueryType\Select\Query\Component\Facet\Field
as
QueryFacetField
;
use
Solarium\QueryType\Select\Query\Component\Facet\Field
as
QueryFacetField
;
...
@@ -156,7 +157,9 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac
...
@@ -156,7 +157,9 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac
}
}
if
(
$query
->
getResponseWriter
()
==
$query
::
WT_JSON
)
{
if
(
$query
->
getResponseWriter
()
==
$query
::
WT_JSON
)
{
$data
[
'facet_counts'
][
'facet_fields'
][
$key
]
=
$this
->
convertToKeyValueArray
(
$data
[
'facet_counts'
][
'facet_fields'
][
$key
]);
$data
[
'facet_counts'
][
'facet_fields'
][
$key
]
=
$this
->
convertToKeyValueArray
(
$data
[
'facet_counts'
][
'facet_fields'
][
$key
]
);
}
}
return
new
ResultFacetField
(
$data
[
'facet_counts'
][
'facet_fields'
][
$key
]);
return
new
ResultFacetField
(
$data
[
'facet_counts'
][
'facet_fields'
][
$key
]);
...
...
library/Solarium/QueryType/Select/ResponseParser/Component/Grouping.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\ResponseParser\Component
;
namespace
Solarium\QueryType\Select\ResponseParser\Component
;
use
Solarium\QueryType\Select\Query\Query
;
use
Solarium\QueryType\Select\Query\Query
;
use
Solarium\QueryType\Select\Query\Component\Grouping
as
GroupingComponent
;
use
Solarium\QueryType\Select\Query\Component\Grouping
as
GroupingComponent
;
use
Solarium\QueryType\Select\Result\Grouping\Result
;
use
Solarium\QueryType\Select\Result\Grouping\Result
;
...
@@ -93,14 +94,10 @@ class Grouping implements ComponentParserInterface
...
@@ -93,14 +94,10 @@ class Grouping implements ComponentParserInterface
}
}
}
}
$valueGroups
[]
=
new
ValueGroup
(
$valueGroups
[]
=
new
ValueGroup
(
$value
,
$numFound
,
$start
,
$documents
);
$value
,
$numFound
,
$start
,
$documents
);
}
}
$groups
[
$field
]
=
new
FieldGroup
(
$groups
[
$field
]
=
new
FieldGroup
(
$matches
,
$groupCount
,
$valueGroups
);
$matches
,
$groupCount
,
$valueGroups
);
}
}
}
}
...
@@ -125,9 +122,7 @@ class Grouping implements ComponentParserInterface
...
@@ -125,9 +122,7 @@ class Grouping implements ComponentParserInterface
}
}
// create a group result object
// create a group result object
$group
=
new
QueryGroup
(
$group
=
new
QueryGroup
(
$matches
,
$numFound
,
$start
,
$maxScore
,
$documents
);
$matches
,
$numFound
,
$start
,
$maxScore
,
$documents
);
$groups
[
$groupQuery
]
=
$group
;
$groups
[
$groupQuery
]
=
$group
;
}
}
}
}
...
...
library/Solarium/QueryType/Select/ResponseParser/Component/MoreLikeThis.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\ResponseParser\Component
;
namespace
Solarium\QueryType\Select\ResponseParser\Component
;
use
Solarium\QueryType\Select\Query\Query
;
use
Solarium\QueryType\Select\Query\Query
;
use
Solarium\QueryType\Select\Query\Component\MoreLikeThis
as
MoreLikeThisComponent
;
use
Solarium\QueryType\Select\Query\Component\MoreLikeThis
as
MoreLikeThisComponent
;
use
Solarium\QueryType\Select\Result\MoreLikeThis\Result
;
use
Solarium\QueryType\Select\Result\MoreLikeThis\Result
;
...
...
library/Solarium/QueryType/Select/ResponseParser/Component/Spellcheck.php
View file @
daa22fce
...
@@ -62,8 +62,7 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
...
@@ -62,8 +62,7 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
*/
*/
public
function
parse
(
$query
,
$spellcheck
,
$data
)
public
function
parse
(
$query
,
$spellcheck
,
$data
)
{
{
if
(
if
(
isset
(
$data
[
'spellcheck'
][
'suggestions'
])
&&
isset
(
$data
[
'spellcheck'
][
'suggestions'
])
&&
is_array
(
$data
[
'spellcheck'
][
'suggestions'
])
&&
is_array
(
$data
[
'spellcheck'
][
'suggestions'
])
&&
count
(
$data
[
'spellcheck'
][
'suggestions'
])
>
0
count
(
$data
[
'spellcheck'
][
'suggestions'
])
>
0
)
{
)
{
...
@@ -121,7 +120,7 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
...
@@ -121,7 +120,7 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
if
(
$queryObject
->
getResponseWriter
()
==
$queryObject
::
WT_JSON
)
{
if
(
$queryObject
->
getResponseWriter
()
==
$queryObject
::
WT_JSON
)
{
if
(
is_array
(
current
(
$values
)))
{
if
(
is_array
(
current
(
$values
)))
{
foreach
(
$values
as
$key
=>
$value
)
{
foreach
(
$values
as
$key
=>
$value
)
{
$values
[
$key
]
=
$this
->
convertToKeyValueArray
(
$value
);
$values
[
$key
]
=
$this
->
convertToKeyValueArray
(
$value
);
}
}
}
else
{
}
else
{
...
@@ -129,7 +128,7 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
...
@@ -129,7 +128,7 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
}
}
}
}
foreach
(
$values
as
$collationValue
)
{
foreach
(
$values
as
$collationValue
)
{
$query
=
null
;
$query
=
null
;
$hits
=
null
;
$hits
=
null
;
$correctionResult
=
null
;
$correctionResult
=
null
;
...
@@ -183,7 +182,7 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
...
@@ -183,7 +182,7 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
$words
=
array
();
$words
=
array
();
if
(
isset
(
$value
[
'suggestion'
])
&&
is_array
(
$value
[
'suggestion'
]))
{
if
(
isset
(
$value
[
'suggestion'
])
&&
is_array
(
$value
[
'suggestion'
]))
{
foreach
(
$value
[
'suggestion'
]
as
$suggestion
)
{
foreach
(
$value
[
'suggestion'
]
as
$suggestion
)
{
if
(
is_string
(
$suggestion
))
{
if
(
is_string
(
$suggestion
))
{
$suggestion
=
array
(
$suggestion
=
array
(
'word'
=>
$suggestion
,
'word'
=>
$suggestion
,
...
@@ -194,8 +193,6 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
...
@@ -194,8 +193,6 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
}
}
}
}
return
new
Suggestion
(
return
new
Suggestion
(
$numFound
,
$startOffset
,
$endOffset
,
$originalFrequency
,
$words
);
$numFound
,
$startOffset
,
$endOffset
,
$originalFrequency
,
$words
);
}
}
}
}
library/Solarium/QueryType/Select/ResponseParser/Component/Stats.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\ResponseParser\Component
;
namespace
Solarium\QueryType\Select\ResponseParser\Component
;
use
Solarium\QueryType\Select\Query\Query
;
use
Solarium\QueryType\Select\Query\Query
;
use
Solarium\QueryType\Select\Query\Component\Stats\Stats
as
StatsComponent
;
use
Solarium\QueryType\Select\Query\Component\Stats\Stats
as
StatsComponent
;
use
Solarium\QueryType\Select\Result\Stats\Stats
as
ResultStats
;
use
Solarium\QueryType\Select\Result\Stats\Stats
as
ResultStats
;
...
@@ -66,9 +67,7 @@ class Stats implements ComponentParserInterface
...
@@ -66,9 +67,7 @@ class Stats implements ComponentParserInterface
if
(
isset
(
$stats
[
'facets'
]))
{
if
(
isset
(
$stats
[
'facets'
]))
{
foreach
(
$stats
[
'facets'
]
as
$facetField
=>
$values
)
{
foreach
(
$stats
[
'facets'
]
as
$facetField
=>
$values
)
{
foreach
(
$values
as
$value
=>
$valueStats
)
{
foreach
(
$values
as
$value
=>
$valueStats
)
{
$stats
[
'facets'
][
$facetField
][
$value
]
=
new
ResultStatsFacetValue
(
$stats
[
'facets'
][
$facetField
][
$value
]
=
new
ResultStatsFacetValue
(
$value
,
$valueStats
);
$value
,
$valueStats
);
}
}
}
}
}
}
...
...
library/Solarium/QueryType/Select/ResponseParser/ResponseParser.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\ResponseParser
;
namespace
Solarium\QueryType\Select\ResponseParser
;
use
Solarium\Core\Query\ResponseParser
as
ResponseParserAbstract
;
use
Solarium\Core\Query\ResponseParser
as
ResponseParserAbstract
;
use
Solarium\Core\Query\ResponseParserInterface
as
ResponseParserInterface
;
use
Solarium\Core\Query\ResponseParserInterface
as
ResponseParserInterface
;
use
Solarium\QueryType\Select\Result\Result
;
use
Solarium\QueryType\Select\Result\Result
;
...
@@ -67,7 +68,9 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt
...
@@ -67,7 +68,9 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt
// create document instances
// create document instances
$documentClass
=
$query
->
getOption
(
'documentclass'
);
$documentClass
=
$query
->
getOption
(
'documentclass'
);
$classes
=
class_implements
(
$documentClass
);
$classes
=
class_implements
(
$documentClass
);
if
(
!
in_array
(
'Solarium\QueryType\Select\Result\DocumentInterface'
,
$classes
)
&&
!
in_array
(
'Solarium\QueryType\Update\Query\Document\DocumentInterface'
,
$classes
))
{
if
(
!
in_array
(
'Solarium\QueryType\Select\Result\DocumentInterface'
,
$classes
)
&&
!
in_array
(
'Solarium\QueryType\Update\Query\Document\DocumentInterface'
,
$classes
)
)
{
throw
new
RuntimeException
(
'The result document class must implement a document interface'
);
throw
new
RuntimeException
(
'The result document class must implement a document interface'
);
}
}
...
...
library/Solarium/QueryType/Select/Result/Highlighting/Highlighting.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\Result\Highlighting
;
namespace
Solarium\QueryType\Select\Result\Highlighting
;
use
Solarium\QueryType\Select\Result\Highlighting\Result
;
use
Solarium\QueryType\Select\Result\Highlighting\Result
;
/**
/**
...
...
library/Solarium/QueryType/Select/Result/MoreLikeThis/MoreLikeThis.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\Result\MoreLikeThis
;
namespace
Solarium\QueryType\Select\Result\MoreLikeThis
;
use
Solarium\QueryType\Select\Result\MoreLikeThis\Result
;
use
Solarium\QueryType\Select\Result\MoreLikeThis\Result
;
/**
/**
...
...
library/Solarium/QueryType/Select/Result/Result.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Select\Result
;
namespace
Solarium\QueryType\Select\Result
;
use
Solarium\QueryType\Select\Query\Query
as
SelectQuery
;
use
Solarium\QueryType\Select\Query\Query
as
SelectQuery
;
use
Solarium\Core\Query\Result\QueryType
as
BaseResult
;
use
Solarium\Core\Query\Result\QueryType
as
BaseResult
;
use
Solarium\QueryType\Select\Result\DocumentInterface
;
use
Solarium\QueryType\Select\Result\DocumentInterface
;
...
...
library/Solarium/QueryType/Suggester/Query.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Suggester
;
namespace
Solarium\QueryType\Suggester
;
use
Solarium\Core\Query\Query
as
BaseQuery
;
use
Solarium\Core\Query\Query
as
BaseQuery
;
use
Solarium\Core\Client\Client
;
use
Solarium\Core\Client\Client
;
use
Solarium\QueryType\Suggester\RequestBuilder
;
use
Solarium\QueryType\Suggester\RequestBuilder
;
...
...
library/Solarium/QueryType/Suggester/RequestBuilder.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Suggester
;
namespace
Solarium\QueryType\Suggester
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Query\RequestBuilder
as
BaseRequestBuilder
;
use
Solarium\Core\Query\RequestBuilder
as
BaseRequestBuilder
;
use
Solarium\Core\Query\QueryInterface
;
use
Solarium\Core\Query\QueryInterface
;
...
...
library/Solarium/QueryType/Suggester/Result/Result.php
View file @
daa22fce
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Suggester\Result
;
namespace
Solarium\QueryType\Suggester\Result
;
use
Solarium\Core\Query\Result\QueryType
as
BaseResult
;
use
Solarium\Core\Query\Result\QueryType
as
BaseResult
;
/**
/**
...
...
library/Solarium/QueryType/Terms/Query.php
View file @
daa22fce
...
@@ -120,7 +120,10 @@ class Query extends BaseQuery
...
@@ -120,7 +120,10 @@ class Query extends BaseQuery
public
function
getFields
()
public
function
getFields
()
{
{
$value
=
$this
->
getOption
(
'fields'
);
$value
=
$this
->
getOption
(
'fields'
);
if
(
$value
===
null
)
$value
=
array
();
if
(
$value
===
null
)
{
$value
=
array
();
}
return
$value
;
return
$value
;
}
}
...
@@ -276,7 +279,10 @@ class Query extends BaseQuery
...
@@ -276,7 +279,10 @@ class Query extends BaseQuery
public
function
getRegexFlags
()
public
function
getRegexFlags
()
{
{
$value
=
$this
->
getOption
(
'regexflags'
);
$value
=
$this
->
getOption
(
'regexflags'
);
if
(
$value
===
null
)
$value
=
array
();
if
(
$value
===
null
)
{
$value
=
array
();
}
return
$value
;
return
$value
;
}
}
...
...
library/Solarium/QueryType/Terms/RequestBuilder.php
View file @
daa22fce
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Terms
;
namespace
Solarium\QueryType\Terms
;
use
Solarium\Core\Query\RequestBuilder
as
BaseRequestBuilder
;
use
Solarium\Core\Query\RequestBuilder
as
BaseRequestBuilder
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Query\QueryInterface
;
use
Solarium\Core\Query\QueryInterface
;
...
...
library/Solarium/QueryType/Update/Query/Query.php
View file @
daa22fce
...
@@ -354,8 +354,7 @@ class Query extends BaseQuery
...
@@ -354,8 +354,7 @@ class Query extends BaseQuery
* @param int $commitWithin
* @param int $commitWithin
* @return self Provides fluent interface
* @return self Provides fluent interface
*/
*/
public
function
addDocument
(
DocumentInterface
$document
,
$overwrite
=
null
,
public
function
addDocument
(
DocumentInterface
$document
,
$overwrite
=
null
,
$commitWithin
=
null
)
$commitWithin
=
null
)
{
{
return
$this
->
addDocuments
(
array
(
$document
),
$overwrite
,
$commitWithin
);
return
$this
->
addDocuments
(
array
(
$document
),
$overwrite
,
$commitWithin
);
}
}
...
@@ -371,8 +370,7 @@ class Query extends BaseQuery
...
@@ -371,8 +370,7 @@ class Query extends BaseQuery
* @param int $commitWithin
* @param int $commitWithin
* @return self Provides fluent interface
* @return self Provides fluent interface
*/
*/
public
function
addDocuments
(
$documents
,
$overwrite
=
null
,
public
function
addDocuments
(
$documents
,
$overwrite
=
null
,
$commitWithin
=
null
)
$commitWithin
=
null
)
{
{
$add
=
new
AddCommand
;
$add
=
new
AddCommand
;
...
@@ -400,8 +398,7 @@ class Query extends BaseQuery
...
@@ -400,8 +398,7 @@ class Query extends BaseQuery
* @param boolean $expungeDeletes
* @param boolean $expungeDeletes
* @return self Provides fluent interface
* @return self Provides fluent interface
*/
*/
public
function
addCommit
(
$softCommit
=
null
,
$waitSearcher
=
null
,
public
function
addCommit
(
$softCommit
=
null
,
$waitSearcher
=
null
,
$expungeDeletes
=
null
)
$expungeDeletes
=
null
)
{
{
$commit
=
new
CommitCommand
();
$commit
=
new
CommitCommand
();
...
@@ -431,8 +428,7 @@ class Query extends BaseQuery
...
@@ -431,8 +428,7 @@ class Query extends BaseQuery
* @param int $maxSegments
* @param int $maxSegments
* @return self Provides fluent interface
* @return self Provides fluent interface
*/
*/
public
function
addOptimize
(
$softCommit
=
null
,
$waitSearcher
=
null
,
public
function
addOptimize
(
$softCommit
=
null
,
$waitSearcher
=
null
,
$maxSegments
=
null
)
$maxSegments
=
null
)
{
{
$optimize
=
new
OptimizeCommand
();
$optimize
=
new
OptimizeCommand
();
...
...
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