lucene.net - Is the order of multi-valued fields in Lucene stable? -


suppose add several values document under same field name:

doc.add( new field( "tag", "one" ) ); doc.add( new field( "tag", "two" ) ); doc.add( new field( "tag", "three" ) ); doc.add( new field( "tag", "four" ) ); 

if later retrieve these fields new instance of document (from search result), guaranteed order of fields in array remain same?

field[] fields = doc.getfields( "tag" );  debug.assert( fields[0].stringvalue() == "one" ); debug.assert( fields[1].stringvalue() == "two" ); debug.assert( fields[2].stringvalue() == "three" ); debug.assert( fields[3].stringvalue() == "four" ); 

current code does, states no guarantees whatsoever, may change @ time.

i wouldn't depend on it.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -