converting a string that contains an array into a json object - arrays

In SOAPUI requests return values in the form of strings, whatever they contain.
A request returns the following string at time t:
{satisfied=true, dynamic_href/properties/triggers, name=triggers, value={satisfied=true, dynamic_href/properties/triggers, name=triggers, value=[{type=DAILY, description=null, configuration={allXDays=1, time=08:10:29, timeProgramMode=TIME, startDate=2019-02-28}, id=guid], metadata={satisfied=true, href=/m2m/fim/metadata/items/com.hager.domovea.automation.sequence.Sequence/properties/triggers, name=null, description=null, type=null, classes=null, regex=null, min=null, max=null, step=null, enumeration=null, beanMetadata=null, readable=null, writable=null, eventable=null, asyncStatusPropertyName=null, attributes=null}, asyncStatusProperty=null}, metadata={satisfied=true, href=/m2m/fim/metadata/items/com.hager.domovea.automation.sequence.Sequence/properties/triggers, name=null, description=null, type=null, classes=null, regex=null, min=null, max=null, step=null, enumeration=null, beanMetadata=null, readable=null, writable=null, eventable=null, asyncStatusPropertyName=null, attributes=null}, asyncStatusProperty=null}
at time t+1 the same request returns the following
{satisfied=true, dynamic_href/properties/triggers, name=triggers, value={satisfied=true, dynamic_href/properties/triggers, name=triggers, value=[{type=DAILY, description=null, configuration={allXDays=1, timeProgramMode=TIME, startDate=2019-02-28, time=08:10:29}, id=guid], metadata={satisfied=true, href=/m2m/fim/metadata/items/com.hager.domovea.automation.sequence.Sequence/properties/triggers, name=null, description=null, type=null, classes=null, regex=null, min=null, max=null, step=null, enumeration=null, beanMetadata=null, readable=null, writable=null, eventable=null, asyncStatusPropertyName=null, attributes=null}, asyncStatusProperty=null}, metadata={satisfied=true, href=/m2m/fim/metadata/items/com.hager.domovea.automation.sequence.Sequence/properties/triggers, name=null, description=null, type=null, classes=null, regex=null, min=null, max=null, step=null, enumeration=null, beanMetadata=null, readable=null, writable=null, eventable=null, asyncStatusPropertyName=null, attributes=null}, asyncStatusProperty=null}
I have to compare them to check that no property changed, however there is a subtle order change in the value array so direct string comparison is impossible.
When I try to use jsonSlurper to convert it so I could compare element by element, it raises an error.
I thought it would help me to parse my responses and compare easily.
I'm trying to find a way to parse high level properties (such as 'satisfied') but also nested properties such as value or metadata and the array at an even lower level ...
EDIT
Trying to parse with json slurper gives me the following error :
expecting '}' or ',' but got current char 's' with an int value of 115
The current character read is 's' with an int value of 115
expecting '}' or ',' but got current char 's' with an int value of 115
line number 1
index number 1
{satisfied=true, dynamic_href/properties/triggers, name=triggers, value={satisfied=true, dynamic_href/properties/triggers, name=triggers, value=[{type=DAILY, description=mon trigger, configuration={allXDays=1, action=switchOn, time=16:01:02, timeProgramMode=TIME, startDate=2018-04-11}, id=guid], metadata={satisfied=true, href=/m2m/fim/metadata/items/com, hager, domovea, automation, homestatus, HomeStatus/properties/triggers, name=null, description=null, type=null, classes=null, regex=null, min=null, max=null, step=null, enumeration=null, beanMetadata=null, readable=null, writable=null, eventable=null, asyncStatusPropertyName=null, attributes=null}, asyncStatusProperty=null}, metadata={satisfied=true, href=/m2m/fim/metadata/items/com, hager, domovea, automation, homestatus, HomeStatus/properties/triggers, name=null, description=null, type=null, classes=null, regex=null, min=null, max=null, step=null, enumeration=null, beanMetadata=null, readable=null, writable=null, eventable=null, asyncStatusPropertyName=null, attributes=null}, asyncStatusProperty=null}
.^

{satisfied=true, dynamic_href/properties/triggers, name=triggers, value={satisfied=true, dynamic_href/properties/triggers, name=triggers, value=[{type=DAILY, description=null, configuration={allXDays=1, timeProgramMode=TIME, startDate=2019-02-28, time=08:10:29}, id=guid], metadata={satisfied=true, href=/m2m/fim/metadata/items/com.hager.domovea.automation.sequence.Sequence/properties/triggers, name=null, description=null, type=null, classes=null, regex=null, min=null, max=null, step=null, enumeration=null, beanMetadata=null, readable=null, writable=null, eventable=null, asyncStatusPropertyName=null, attributes=null}, asyncStatusProperty=null}, metadata={satisfied=true, href=/m2m/fim/metadata/items/com.hager.domovea.automation.sequence.Sequence/properties/triggers, name=null, description=null, type=null, classes=null, regex=null, min=null, max=null, step=null, enumeration=null, beanMetadata=null, readable=null, writable=null, eventable=null, asyncStatusPropertyName=null, attributes=null}, asyncStatusProperty=null}
There are mismatched curly braces in that String. There are 6 { and 5 }. The parser can't deal with that.
EDIT
2 other issues are that the keys are not quoted and there are = where there should be :. There is also stuff like ... , dynamic_href/properties/triggers, ... which is not valid JSON.

Related

How to get XML element properties in SQL Server

I am trying to parse XML data from a SSIS package, and I want to get the XML element property values.
<DTS:Executable xmlns:DTS="www.microsoft.com/SqlServer/Dts" DTS:refId="Package" DTS:CreationDate="9/15/2021 11:38:35 AM" DTS:CreationName="Microsoft.Package" DTS:CreatorComputerName="X" DTS:CreatorName="Y" DTS:DTSID="{5BDDA1D9-F546-47BC-81BB-E29C0E22D5DA}" DTS:ExecutableType="Microsoft.Package" DTS:LastModifiedProductVersion="16.0.694.0" DTS:LocaleID="1033" DTS:ObjectName="Mine" DTS:PackageType="5" DTS:VersionBuild="195" DTS:VersionGUID="{68B021E9-5664-4E2B-A64D-C8B5CAF38316}">
<DTS:Property DTS:Name="PackageFormatVersion">8</DTS:Property>
<DTS:ConnectionManagers>
<DTS:ConnectionManager DTS:refId="Package.ConnectionManagers[A]" DTS:CreationName="OLEDB" DTS:DTSID="{AE299D88-1DB8-48B1-8548-31BE5C2F2721}" DTS:ObjectName="A">
<DTS:PropertyExpression DTS:Name="InitialCatalog">#[User::A]</DTS:PropertyExpression>
<DTS:PropertyExpression DTS:Name="ServerName">#[User::B]</DTS:PropertyExpression>
<DTS:ObjectData>
<DTS:ConnectionManager DTS:Retain="True" DTS:ConnectRetryCount="1" DTS:ConnectRetryInterval="5" DTS:ConnectionString="Data Source=XXX;Initial Catalog=XXX;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;Application Name=XXXXX;" />
</DTS:ObjectData>
</DTS:ConnectionManager>
</DTS:ConnectionManagers>
</DTS:Executable>
FOR THIS LINE:
<DTS:Property DTS:Name="PackageFormatVersion">8</DTS:Property>
I want to get the Name="PackageFormatVersion" from the Property element.
How do I do this in T-SQL?
Assuming that the XML is a value of a variable.
SQL
DECLARE #xml XML =
N'<DTS:Executable xmlns:DTS="www.microsoft.com/SqlServer/Dts" DTS:refId="Package" DTS:CreationDate="9/15/2021 11:38:35 AM" DTS:CreationName="Microsoft.Package" DTS:CreatorComputerName="X" DTS:CreatorName="Y" DTS:DTSID="{5BDDA1D9-F546-47BC-81BB-E29C0E22D5DA}"
DTS:ExecutableType="Microsoft.Package" DTS:LastModifiedProductVersion="16.0.694.0" DTS:LocaleID="1033" DTS:ObjectName="Mine" DTS:PackageType="5" DTS:VersionBuild="195" DTS:VersionGUID="{68B021E9-5664-4E2B-A64D-C8B5CAF38316}">
<DTS:Property DTS:Name="PackageFormatVersion">8</DTS:Property>
<DTS:ConnectionManagers>
<DTS:ConnectionManager DTS:refId="Package.ConnectionManagers[A]" DTS:CreationName="OLEDB" DTS:DTSID="{AE299D88-1DB8-48B1-8548-31BE5C2F2721}" DTS:ObjectName="A">
<DTS:PropertyExpression DTS:Name="InitialCatalog">#[User::A]</DTS:PropertyExpression>
<DTS:PropertyExpression DTS:Name="ServerName">#[User::B]</DTS:PropertyExpression>
<DTS:ObjectData>
<DTS:ConnectionManager DTS:Retain="True" DTS:ConnectRetryCount="1" DTS:ConnectRetryInterval="5"
DTS:ConnectionString="Data Source=XXX;Initial Catalog=XXX;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;Application Name=XXXXX;"/>
</DTS:ObjectData>
</DTS:ConnectionManager>
</DTS:ConnectionManagers>
</DTS:Executable>';
;WITH XMLNAMESPACES(DEFAULT 'www.microsoft.com/SqlServer/Dts')
SELECT result = #xml.value('(/Executable/Property/text())[1]', 'INT');
Output
result
8
The ask is for the attribute value. And the catch is that the default namespace doesn't apply to attributes, so you have to add it explicitly.
DECLARE #xml XML =
N'<DTS:Executable xmlns:DTS="www.microsoft.com/SqlServer/Dts" DTS:refId="Package" DTS:CreationDate="9/15/2021 11:38:35 AM" DTS:CreationName="Microsoft.Package" DTS:CreatorComputerName="X" DTS:CreatorName="Y" DTS:DTSID="{5BDDA1D9-F546-47BC-81BB-E29C0E22D5DA}"
DTS:ExecutableType="Microsoft.Package" DTS:LastModifiedProductVersion="16.0.694.0" DTS:LocaleID="1033" DTS:ObjectName="Mine" DTS:PackageType="5" DTS:VersionBuild="195" DTS:VersionGUID="{68B021E9-5664-4E2B-A64D-C8B5CAF38316}">
<DTS:Property DTS:Name="PackageFormatVersion">8</DTS:Property>
<DTS:ConnectionManagers>
<DTS:ConnectionManager DTS:refId="Package.ConnectionManagers[A]" DTS:CreationName="OLEDB" DTS:DTSID="{AE299D88-1DB8-48B1-8548-31BE5C2F2721}" DTS:ObjectName="A">
<DTS:PropertyExpression DTS:Name="InitialCatalog">#[User::A]</DTS:PropertyExpression>
<DTS:PropertyExpression DTS:Name="ServerName">#[User::B]</DTS:PropertyExpression>
<DTS:ObjectData>
<DTS:ConnectionManager DTS:Retain="True" DTS:ConnectRetryCount="1" DTS:ConnectRetryInterval="5"
DTS:ConnectionString="Data Source=XXX;Initial Catalog=XXX;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;Application Name=XXXXX;"/>
</DTS:ObjectData>
</DTS:ConnectionManager>
</DTS:ConnectionManagers>
</DTS:Executable>';
;WITH XMLNAMESPACES(DEFAULT 'www.microsoft.com/SqlServer/Dts', 'www.microsoft.com/SqlServer/Dts' as DTS)
SELECT result = #xml.value('(/Executable/Property/#DTS:Name)[1]', 'varchar(200)');

datomic / datalevin performance and db size - is this schema wrong?

I am trying to enter what's essentially tabular data in a datalevin dB. I'm wondering whether I'm doing something deeply wrong, maybe with the schema? The database grows extremely fast on disk (100x bigger than the equivalent CSV) and query time is also quite slow, and increasing with the size of the dB.
Each transaction below ("fake-portfolio") is around 900k datoms, it takes several seconds to write, and after about 10 transactions on my machine it just crashes.
The typical query I'd like to do is something akin to
(d/q '[:find ?date ?portfolio (sum ?nav)
:in $
:keys date portfolio nav
:with ?position/bond
:where
[?e :position/portfolio ?portfolio]
[?e :position/date ?date]
[?e :position/bond-id-ref ?bond]
[?e :position/weight ?nav]
]
(d/db test-connection)
(def test-schema {
:position/bond-id-ref {:db/valueType :db.type/long :db/cardinality :db.cardinality/one} ;will link to bond above
:position/date {:db/valueType :db.type/long :db/cardinality :db.cardinality/one}
:position/portfolio {:db/valueType :db.type/string :db/cardinality :db.cardinality/one}
:position/weight {:db/valueType :db.type/double :db/cardinality :db.cardinality/one}
:position/bm-weight {:db/valueType :db.type/double :db/cardinality :db.cardinality/one}
:position/weight-delta {:db/valueType :db.type/double :db/cardinality :db.cardinality/one}
:position/contrib-yield {:db/valueType :db.type/double :db/cardinality :db.cardinality/one}
:position/contrib-zspread {:db/valueType :db.type/double :db/cardinality :db.cardinality/one}
:position/contrib-gspread {:db/valueType :db.type/double :db/cardinality :db.cardinality/one}
:position/contrib-mdur {:db/valueType :db.type/double :db/cardinality :db.cardinality/one}
:position/mdur-delta {:db/valueType :db.type/double :db/cardinality :db.cardinality/one}
:position/bm-contrib-eir-duration {:db/valueType :db.type/double :db/cardinality :db.cardinality/one}
:position/bm-contrib-yield {:db/valueType :db.type/double :db/cardinality :db.cardinality/one}
:position/bm-contrib-govt-spread {:db/valueType :db.type/double :db/cardinality :db.cardinality/one}
:position/contrib-beta-1y-daily {:db/valueType :db.type/double :db/cardinality :db.cardinality/one}
:position/duration-times-spread-weight {:db/valueType :db.type/double :db/cardinality :db.cardinality/one}
:position/quant-value-4d {:db/valueType :db.type/double :db/cardinality :db.cardinality/one}
:position/quant-value-2d {:db/valueType :db.type/double :db/cardinality :db.cardinality/one}})
(def test-database-path "/tmp/datalevin/testpositions")
(defn fake-portfolio [d]
(into []
(for [p (range 0 25)
b (range 0 2000)]
{
:position/bond-id-ref b
:position/date d
:position/portfolio (str "portfolio-" p)
:position/weight 0.5
:position/bm-weight 0.2
:position/weight-delta 0.3
:position/contrib-yield 0.8
:position/contrib-zspread 3.4
:position/contrib-gspread 6.7
:position/contrib-mdur 8.756
:position/mdur-delta 45.6568
:position/bm-contrib-eir-duration 0.3
:position/bm-contrib-yield 0.0
:position/bm-contrib-govt-spread 78.5
:position/contrib-beta-1y-daily 45.5
:position/duration-times-spread-weight 0.3
:position/quant-value-4d 0.2
:position/quant-value-2d 0.7}
)
)
)
(def test-connection (d/get-conn test-database-path test-schema))
(defn fill-test-db [n]
(doseq [i (range n)]
(d/transact! test-connection (fake-portfolio i))))
Thank you,

Solr Repeater ReplicationHandler Exception

I am using Solr8.8.0 leader and there are about 16 repeaters. I am seeing following exception on repeater. (Not using SolrCloud) When I checked the Leader instance for file "_9.fdm", it is not there. So my question is where the repeater is getting the name of file from when it does not even exist on Leader? And how to resolve the issue. TIA
Exception while writing response for params: generation=11&checksum=true&qt=/replication&file=_9.fdm&wt=filestream&command=filecontent
java.nio.file.NoSuchFileException: /app/solr/testCore/data/index.20210817190431551/_9.fdm
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:177)
at java.nio.channels.FileChannel.open(FileChannel.java:287)
at java.nio.c`enter code here`hannels.FileChannel.open(FileChannel.java:335)
at org.apache.lucene.store.MMapDirectory.openInput(MMapDirectory.java:238)
at org.apache.lucene.store.NRTCachingDirectory.openInput(NRTCachingDirectory.java:181)
at org.apache.solr.handler.ReplicationHandler$DirectoryFileStream.write(ReplicationHandler.java:1648)
at org.apache.solr.core.SolrCore$4.write(SolrCore.java:2796)
at org.apache.solr.response.QueryResponseWriterUtil.writeQueryResponse(QueryResponseWriterUtil.java:49)
at org.apache.solr.servlet.HttpSolrCall.writeResponse(HttpSolrCall.java:890)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:583)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:427)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:357)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1612)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1582)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
at org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:177)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
at java.lang.Thread.run(Thread.java:748)

Issue in DatagridView Combobox selecting value

i have the XML which i am assigning to the datagridview combobox, in which 5 values are there, all values are having same CountyName but different CountyID.
<CityCounty>
<CountyID xmlns="http:// ">25</CountyID>
<CountyName xmlns="http">Washington Township</CountyName>
<StateID xmlns="http:">NJ</StateID>
<TaxDistrictCode xmlns="http:// ">552</TaxDistrictCode>
</CityCounty>
<CityCounty>
<CountyID xmlns="http: ">26</CountyID>
<CountyName xmlns="http">Washington Township</CountyName>
<StateID xmlns="http: ">NJ</StateID>
<TaxDistrictCode xmlns="http">553</TaxDistrictCode>
</CityCounty>
<CityCounty>
<CountyID xmlns="http: ">27</CountyID>
<CountyName xmlns="http">Washington Township</CountyName>
<StateID xmlns="http: ">NJ</StateID>
<TaxDistrictCode xmlns="http">553</TaxDistrictCode>
</CityCounty>
<CityCounty>
<CountyID xmlns="http: ">28</CountyID>
<CountyName xmlns="http">Washington Township</CountyName>
<StateID xmlns="http: ">NJ</StateID>
<TaxDistrictCode xmlns="http">554</TaxDistrictCode>
</CityCounty>
<CityCounty>
<CountyID xmlns="http: ">29</CountyID>
<CountyName xmlns="http">Washington Township</CountyName>
<StateID xmlns="http: ">NJ</StateID>
<TaxDistrictCode xmlns="http">555</TaxDistrictCode>
</CityCounty>
i am assigning the display member of the datagridview combobox as CountyName and value member as CountyID
List<ClassCityCounty> cityCountyList1;
var s = new XmlSerializer(typeof(List<CityCounty>));
var path = EnvironmentPath.GetEnvironmentPath() + #"\XML\CityCounty.xml";
var r = new StreamReader(#path);
cityCountyList1 = (List<CityCounty>)s.Deserialize(r);
r.Close();
DataGridViewComboBoxCell dgvCbo = dgvGridName[colindex, rowindex] as DataGridViewComboBoxCell;
dgvCbo.DataSource = cityCountyList1; //list value - parsed from XML
dgvCbo.DisplayMember = Constants.CITYCOUNTYNAME;
dgvCbo.ValueMember = Constants.COUNTYID;
once i user select the any of the values i need to fetch the selected CountyID from the droupdown and need to pass for the further operation.
string testid = dgvGridName.CurrentRow.Cells[colindex].Value.ToString()
but whatever the value i am selecting from the dropdown, i am getting the same CountyID 28 for the above string testid. i should get different CountyID for the each value, but i am getting same CountyID So any can please suggest me what i am doing wrong and suggest some solution. thanks in Advance !

EarlyTerminatingCollectorException in MLT Component of SOLR 4.4

I send a query to SOLR, which returns exactly one document. It's a "id:some_doc_id" search. Here are the parameters as shown in the response:
params: {
mlt.mindf: "1",
mlt.count: "5",
mlt.fl: "text",
fl: "id,,application_id,... project_start,project_end,project_title,score",
start: "0",
q: "id:some_doc_id",
mlt.mintf: "1",
mlt: "true",
wt: "json",
rows: "1"
}
The reponse key contains the document I expected, but I also get an error, which seems to happen in the MLT component. Here's the stack trace provided in the response:
org.apache.solr.search.EarlyTerminatingCollectorException
at org.apache.solr.search.EarlyTerminatingCollector.collect(EarlyTerminatingCollector.java:62)
at org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:289)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:624)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)
at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1494)
at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1363)
at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:474)
at org.apache.solr.search.SolrIndexSearcher.getDocList(SolrIndexSearcher.java:1226)
at org.apache.solr.handler.MoreLikeThisHandler$MoreLikeThisHelper.getMoreLikeThis(MoreLikeThisHandler.java:365)
at org.apache.solr.handler.component.MoreLikeThisComponent.getMoreLikeThese(MoreLikeThisComponent.java:356)
at org.apache.solr.handler.component.MoreLikeThisComponent.process(MoreLikeThisComponent.java:113)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:208)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1904)
at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:659)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:362)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:158)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:368)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:724org.apache.solr.search.EarlyTerminatingCollectorException
at org.apache.solr.search.EarlyTerminatingCollector.collect(EarlyTerminatingCollector.java:62)
at org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:289)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:624)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)
at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1494)
at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1363)
at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:474)
at org.apache.solr.search.SolrIndexSearcher.getDocList(SolrIndexSearcher.java:1226)
at org.apache.solr.handler.MoreLikeThisHandler$MoreLikeThisHelper.getMoreLikeThis(MoreLikeThisHandler.java:365)
at org.apache.solr.handler.component.MoreLikeThisComponent.getMoreLikeThese(MoreLikeThisComponent.java:356)
at org.apache.solr.handler.component.MoreLikeThisComponent.process(MoreLikeThisComponent.java:113)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:208)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1904)
at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:659)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:362)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:158)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:368)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:724))
My code worked fine before the update to SOLR 4.4. Any hint what's going on and how to solve it?
Thrown by EarlyTerminatingCollector when the maximum to abort the scoring / collection process early, when the specified maximum number of documents were collected.
This description doesn't sound like a real exception and more like a way to abort the collecting of documents.
#Override
public void collect(int doc) throws IOException {
delegate.collect(doc);
lastDocId = doc;
numCollected++;
if(numCollected==maxDocsToCollect) {
throw new EarlyTerminatingCollectorException(numCollected, lastDocId);
}
}

Resources