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
6322500a
Commit
6322500a
authored
Aug 21, 2011
by
Bas de Nooijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added support for parsing the matched doc
- small style and phpdoc fixes
parent
ad0f9888
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
library/Solarium/Client/ResponseParser/MoreLikeThis.php
library/Solarium/Client/ResponseParser/MoreLikeThis.php
+15
-9
No files found.
library/Solarium/Client/ResponseParser/MoreLikeThis.php
View file @
6322500a
...
@@ -43,14 +43,13 @@
...
@@ -43,14 +43,13 @@
* @package Solarium
* @package Solarium
* @subpackage Client
* @subpackage Client
*/
*/
class
Solarium_Client_ResponseParser_MoreLikeThis
class
Solarium_Client_ResponseParser_MoreLikeThis
extends
Solarium_Client_ResponseParser_Select
extends
Solarium_Client_ResponseParser_Select
{
{
/**
/**
* Get result data for the response
* Get result data for the response
*
*
* @param Solarium_Result_
Select
$result
* @param Solarium_Result_
MoreLikeThis
$result
* @return array
* @return array
*/
*/
public
function
parse
(
$result
)
public
function
parse
(
$result
)
...
@@ -58,10 +57,8 @@ class Solarium_Client_ResponseParser_MoreLikeThis
...
@@ -58,10 +57,8 @@ class Solarium_Client_ResponseParser_MoreLikeThis
$data
=
$result
->
getData
();
$data
=
$result
->
getData
();
$query
=
$result
->
getQuery
();
$query
=
$result
->
getQuery
();
$postResult
=
parent
::
parse
(
$result
);
$parseResult
=
parent
::
parse
(
$result
);
if
(
isset
(
$data
[
'interestingTerms'
])
if
(
isset
(
$data
[
'interestingTerms'
])
&&
'none'
!=
$query
->
getInterestingTerms
())
{
and
'none'
!=
$query
->
getInterestingTerms
()
)
{
$terms
=
$data
[
'interestingTerms'
];
$terms
=
$data
[
'interestingTerms'
];
if
(
'details'
==
$query
->
getInterestingTerms
())
{
if
(
'details'
==
$query
->
getInterestingTerms
())
{
$tempTerms
=
array
();
$tempTerms
=
array
();
...
@@ -70,9 +67,18 @@ class Solarium_Client_ResponseParser_MoreLikeThis
...
@@ -70,9 +67,18 @@ class Solarium_Client_ResponseParser_MoreLikeThis
}
}
$terms
=
$tempTerms
;
$terms
=
$tempTerms
;
}
}
$p
ost
Result
[
'interestingTerms'
]
=
$terms
;
$p
arse
Result
[
'interestingTerms'
]
=
$terms
;
}
}
return
$postResult
;
if
(
isset
(
$data
[
'match'
][
'docs'
][
0
])
&&
true
==
$query
->
getMatchInclude
())
{
$matchData
=
$data
[
'match'
][
'docs'
][
0
];
$documentClass
=
$query
->
getOption
(
'documentclass'
);
$fields
=
(
array
)
$matchData
;
$parseResult
[
'match'
]
=
new
$documentClass
(
$fields
);
}
return
$parseResult
;
}
}
}
}
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