Hoss Man (JIRA) schrieb:
The one subtlety that your patch broke however is that if someone uses null as a key in the Map, that has always been written out as an entry w/o a key -- but by using String.valueOf your patch allways produces a non-null
Yes you're right. I didn't look deep enough and
revision 925031.
XMLWriter throws ClassCastException on writing maps other than String,?
-
Key: SOLR-1823
URL: https://issues.apache.org/jira/browse/SOLR-1823
Project: Solr
XMLWriter throws ClassCastException on writing maps other than String,?
-
Key: SOLR-1823
URL: https://issues.apache.org/jira/browse/SOLR-1823
Project: Solr
Issue Type
key.
It therefore could not fail.
XMLWriter throws ClassCastException on writing maps other than String,?
-
Key: SOLR-1823
URL: https://issues.apache.org/jira/browse/SOLR-1823
Created SOLR-1823.
I attached a patch for this particular problem.
Any other places we missed this?
None, that I could spot,
there are so many warnings about unchecked castings rsp. not using Generics.
--
mit freundlichem Gruß,
Frank Wesemann
Fotofinder GmbH USt-IdNr. DE812854514
Hello,
I don't want to roll up all the XMLWriter issues, but stumpled upon this:
http://lucene.apache.org/solr/api/org/apache/solr/response/SolrQueryResponse.html#returnable_data
says that a Map containing any of the items in this list may be
contained in a SolrQueryResponse and will be handled
On Fri, Mar 12, 2010 at 3:37 PM, Frank Wesemann
f.wesem...@fotofinder.net wrote:
Hello,
I don't want to roll up all the XMLWriter issues, but stumpled upon this:
http://lucene.apache.org/solr/api/org/apache/solr/response/SolrQueryResponse.html#returnable_data
says that a Map containing any
Yeah, seems like the right approach.
Good, I feared I missed sth. obvious. :-)
Any other places we missed this?
I'll have a look at it.
I'll also open an JIRA issue and add patches etc, if you don't mind.
--
mit freundlichem Gruß,
Frank Wesemann
Fotofinder GmbH USt-IdNr.
.
No, not if the function is well defined for a null value.
And if we moved the null check to the callers, I'd argue that the null check
should be entirely left out of writeAttr - skip the extra code and let the NPE
happen naturally.
XMLWriter#writeAttr silently ignores null attribute values
,
Chris
XMLWriter#writeAttr silently ignores null attribute values
--
Key: SOLR-1591
URL: https://issues.apache.org/jira/browse/SOLR-1591
Project: Solr
Issue Type: Bug
Affects
on
it.
XMLWriter#writeAttr silently ignores null attribute values
--
Key: SOLR-1591
URL: https://issues.apache.org/jira/browse/SOLR-1591
Project: Solr
Issue Type: Bug
Affects Versions
like a plan, +1 to that. Then, we can stop wasting time on this and
move on to (more) interesting stuff...
XMLWriter#writeAttr silently ignores null attribute values
--
Key: SOLR-1591
URL: https
[
https://issues.apache.org/jira/browse/SOLR-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris A. Mattmann updated SOLR-1591:
Component/s: Response Writers
XMLWriter#writeAttr silently ignores null attribute values
an exception to be thrown and a null check explicitly (at the
expense of the additional lines of code) since it's more verbose and explicit
rather than implicit.
Thoughts? Anyone?
Cheers,
Chris
XMLWriter#writeAttr silently ignores null attribute values
. This works as designed. we just need enough javadocs to tell it
clearly.
XMLWriter#writeAttr silently ignores null attribute values
--
Key: SOLR-1591
URL: https://issues.apache.org/jira/browse/SOLR-1591
, but as designed, it's a wasted function call.
SOLR is all about performance. Why waste a function call here?
XMLWriter#writeAttr silently ignores null attribute values
--
Key: SOLR-1591
URL: https
are rare .optimizing for cornercases is not a good idea
* the cost of a function call is almost zilch. it is not even measurable
XMLWriter#writeAttr silently ignores null attribute values
--
Key: SOLR-1591
URL
, depending on the start/end
row params.
{quote}
* the cost of a function call is almost zilch. it is not even measurable
{quote}
cost(function) cost(comparison)
XMLWriter#writeAttr silently ignores null attribute values
, which can be large, depending on the start/end
row params.
{quote}
* the cost of a function call is almost zilch. it is not even measurable
{quote}
cost(function) cost(comparison)
XMLWriter#writeAttr silently ignores null attribute values
.
Some basic javadoc for XMLWriter#startTag
-
Key: SOLR-1590
URL: https://issues.apache.org/jira/browse/SOLR-1590
Project: Solr
Issue Type: Improvement
Affects Versions: 1.4
Environment: My
and that triggered expensive validation when
they didn't want it.
there are also people using the XML response format for incredibly small
responses (thing an autosuggest component) where a schema delcaration would
double the size of hte response.
Make XMLWriter write out xml that references the SOLR
and throw up the
patches today. Thanks for the feedback!
Make XMLWriter write out xml that references the SOLR response XSD/DTD
---
Key: SOLR-1669
URL: https://issues.apache.org/jira/browse
more sense to include the XSD in
the war and keep it all on the same host
Make XMLWriter write out xml that references the SOLR response XSD/DTD
---
Key: SOLR-1669
URL: https
sense to include the XSD in
the war and keep it all on the same host
{quote}
Good point. I'll address as part of 1.
Make XMLWriter write out xml that references the SOLR response XSD/DTD
---
Key: SOLR-1669
.
Make XMLWriter write out xml that references the SOLR response XSD/DTD
---
Key: SOLR-1669
URL: https://issues.apache.org/jira/browse/SOLR-1669
Project: Solr
Issue Type
}
The default should be to not include a schema.
{quote}
Why?
Make XMLWriter write out xml that references the SOLR response XSD/DTD
---
Key: SOLR-1669
URL: https://issues.apache.org/jira/browse
. What good is the noSchema
thing?
Make XMLWriter write out xml that references the SOLR response XSD/DTD
---
Key: SOLR-1669
URL: https://issues.apache.org/jira/browse/SOLR-1669
by the xml is a real url?
it is just a unique string . it could be just about anything else.
Make XMLWriter write out xml that references the SOLR response XSD/DTD
---
Key: SOLR-1669
URL: https
Make XMLWriter write out xml that references the SOLR response XSD/DTD
---
Key: SOLR-1669
URL: https://issues.apache.org/jira/browse/SOLR-1669
Project: Solr
Issue Type
by XMLWriter
Make XMLWriter write out xml that references the SOLR response XSD/DTD
---
Key: SOLR-1669
URL: https://issues.apache.org/jira/browse/SOLR-1669
Project: Solr
[
https://issues.apache.org/jira/browse/SOLR-1592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12789678#action_12789678
]
Lance Norskog commented on SOLR-1592:
-
Ok, never mind.
Refactor XMLWriter startTag
Rename XMLWriter (and XMLResponseWriter) to SolrXmlResponseWriter
-
Key: SOLR-1648
URL: https://issues.apache.org/jira/browse/SOLR-1648
Project: Solr
Issue Type: Improvement
://www.lucidimagination.com/search/document/e8bb6cac84c1f520/namespaces_in_response_solr_1586#cc50ba9e9d8fe2dc
Rename XMLWriter (and XMLResponseWriter) to SolrXmlResponseWriter
-
Key: SOLR-1648
URL
the XSLTResponseWriter. In particular
please check namespace handling with XSL.
Do the other responsewriters care about attributes?
Refactor XMLWriter startTag to allow arbitrary attributes to be written
---
Key: SOLR
the XSLTResponseWriter. ?
What has this got to do with XSLTResponseWriter? The methods added are like
helper methods which can be used by custom response writers.
Refactor XMLWriter startTag to allow arbitrary attributes to be written
on this -- the methods that were added were simple
helper methods -- we didn't change any core code nor did we expose any features
that needed regression checks?
Cheers,
Chris
Refactor XMLWriter startTag to allow arbitrary attributes to be written
Chris Hostetter wrote:
Perhaps instead of making API additions/generalizations to XMLWriter, we
should approach the problem differnelty and think about what a good
reusable general pupose XML generation toolkit that could be used by
custom response writers should look like, and then implement
: Sure, but my point was, I am still able to call xmlWriter.writePrim which
: lets me write XML tags with unbound names in an arbitrary fashion. In other
: words, I can make my field (for XML) instead of spitting out:
Oh man ... WTF is writePrim doing marked public ?!?!?!?!
...this is why
, Chris Hostetter
hossman_luc...@fucit.org wrote:
XMLWriter was originally created
to be a wrapper arround a java.io.Writer that had convinent heper methods
for generating a specific XML response format (ie: wt=xml) back before
Solr even supported multiple output types.
Indeed - my longer term
+1 on it -- it meets my use case (and what I'm
doing with SOLR-1586). I'll attach a new patch for SOLR-1586 that uses this
code if you are OK to commit it.
Cheers,
Chris
Refactor XMLWriter startTag to allow arbitrary attributes to be written
[
https://issues.apache.org/jira/browse/SOLR-1592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12782769#action_12782769
]
Noble Paul commented on SOLR-1592:
--
committed r884411
Thanks Mattman
Refactor XMLWriter
to resolve...
I'll attach a patch to SOLR-1586 that leverages this new code...
Refactor XMLWriter startTag to allow arbitrary attributes to be written
---
Key: SOLR-1592
URL: https
[
https://issues.apache.org/jira/browse/SOLR-1592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Noble Paul resolved SOLR-1592.
--
Resolution: Fixed
Refactor XMLWriter startTag to allow arbitrary attributes to be written
[
https://issues.apache.org/jira/browse/SOLR-1592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Noble Paul reassigned SOLR-1592:
Assignee: Noble Paul
Refactor XMLWriter startTag to allow arbitrary attributes to be written
: Refactor XMLWriter startTag to allow arbitrary attributes to be written
...
: There are certain cases in which a user would like to write arbitrary
: attributes as part of the XML output for a field tag. Case in point: I'd
...i think here may be a disconnect here between some
Hi Chris,
Thanks for the inputs: comments inline below:
...i think here may be a disconnect here between some of the goals you are
describing and the purpose of XMLWriter. XMLWriter was originally created
to be a wrapper arround a java.io.Writer that had convinent heper methods
: Potentially -- my problem is, why is XMLWriter a sacred cow? There's not
I'm not trying to suggest that it should be ... my point wasn't to
suggest that we shouldn't modify XMLWriter because it needs to be
preserved as is -- my point was that given XMLWriter's origins, trying to
shoehorn
Hi Hoss,
Comments inline:
: Potentially -- my problem is, why is XMLWriter a sacred cow? There's not
I'm not trying to suggest that it should be ... my point wasn't to
suggest that we shouldn't modify XMLWriter because it needs to be
preserved as is -- my point was that given
On Mon, Nov 23, 2009 at 7:04 PM, Chris Hostetter
hossman_luc...@fucit.org wrote:
XMLWriter was originally created
to be a wrapper arround a java.io.Writer that had convinent heper methods
for generating a specific XML response format (ie: wt=xml) back before
Solr even supported multiple output
[
https://issues.apache.org/jira/browse/SOLR-1592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Noble Paul updated SOLR-1592:
-
Attachment: SOLR-1592.patch
isn't this good enough?
Refactor XMLWriter startTag to allow arbitrary
[
https://issues.apache.org/jira/browse/SOLR-1592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Noble Paul updated SOLR-1592:
-
Attachment: SOLR-1592.patch
added a method to write cdata also
Refactor XMLWriter startTag to allow
Some basic javadoc for XMLWriter#startTag
-
Key: SOLR-1590
URL: https://issues.apache.org/jira/browse/SOLR-1590
Project: Solr
Issue Type: Improvement
Affects Versions: 1.4
Environment: My
[
https://issues.apache.org/jira/browse/SOLR-1590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris A. Mattmann updated SOLR-1590:
Attachment: SOLR-1590.Mattmann.112209.patch.txt
Some basic javadoc for XMLWriter#startTag
XMLWriter#writeAttr silently ignores null attribute values
--
Key: SOLR-1591
URL: https://issues.apache.org/jira/browse/SOLR-1591
Project: Solr
Issue Type: Bug
Affects Versions
[
https://issues.apache.org/jira/browse/SOLR-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris A. Mattmann updated SOLR-1591:
Attachment: SOLR-1591.Mattmann.112209.patch.txt
XMLWriter#writeAttr silently ignores null
bug.
XMLWriter#writeAttr silently ignores null attribute values
--
Key: SOLR-1591
URL: https://issues.apache.org/jira/browse/SOLR-1591
Project: Solr
Issue Type: Bug
Affects
... one could also think of it as
null being a valid attribute value to pass, and the encoding of that shall be
to leave it out entirely. I don't really know/remember if it's used that way
or not, but it's safest to assume that it is.
XMLWriter#writeAttr silently ignores null attribute values
was all quiet on the western front...)
XMLWriter#writeAttr silently ignores null attribute values
--
Key: SOLR-1591
URL: https://issues.apache.org/jira/browse/SOLR-1591
Project: Solr
added the following javadoc to clarify:
/** Writes the XML attribute name/val. A null val means that the attribute is
missing */
XMLWriter#writeAttr silently ignores null attribute values
--
Key: SOLR-1591
[
https://issues.apache.org/jira/browse/SOLR-1592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris A. Mattmann updated SOLR-1592:
Attachment: SOLR-1592.Mattmann.112209.patch.txt
Refactor XMLWriter startTag to allow
Refactor XMLWriter startTag to allow arbitrary attributes to be written
---
Key: SOLR-1592
URL: https://issues.apache.org/jira/browse/SOLR-1592
Project: Solr
Issue Type
with a few more methods. I can add
javadocs to them to explain them better, but I think this is a lot more
flexible than the current methods that exist (see the patch I'm about to attach
to SOLR-1586 as evidence).
Refactor XMLWriter startTag to allow arbitrary attributes to be written
Add the ability to disable XML escaping in XMLWriter
Key: SOLR-431
URL: https://issues.apache.org/jira/browse/SOLR-431
Project: Solr
Issue Type: New Feature
Components: search
[
https://issues.apache.org/jira/browse/SOLR-431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kevin Osborn updated SOLR-431:
--
Attachment: XMLWriter.diff
Add the ability to disable XML escaping in XMLWriter
I encountered an escaping issue with XMLWriter. Locally I've added
the following test to BasicFunctionalityTest to demonstrate:
public void testXMLWriter() throws Exception {
SolrQueryResponse rsp = new SolrQueryResponse();
rsp.add(\quoted\, value);
StringWriter writer = new
On 4/21/06, Erik Hatcher [EMAIL PROTECTED] wrote:
I've corrected this in my local copy with this patch adding the
escaping to attribute names and the quot; to XML.chardata_escapes.
The question is, is it appropriate to escape quotes everywhere, or
should it just be done when writing attribute
66 matches
Mail list logo