Tabnine Logo
OContextualRecordId.setContext
Code IndexAdd Tabnine to your IDE (free)

How to use
setContext
method
in
com.orientechnologies.orient.core.id.OContextualRecordId

Best Java code snippets using com.orientechnologies.orient.core.id.OContextualRecordId.setContext (Showing top 5 results out of 315)

origin: orientechnologies/orientdb-lucene

@Override
public void onRecordAddedToResultSet(QueryContext queryContext, OContextualRecordId recordId, Document ret, final ScoreDoc score) {
 recordId.setContext(new HashMap<String, Object>() {
  {
   put("score", score.score);
  }
 });
}
origin: com.orientechnologies/orientdb-lucene

@Override
public void onRecordAddedToResultSet(OLuceneQueryContext queryContext, OContextualRecordId recordId, Document ret,
  final ScoreDoc score) {
 recordId.setContext(new HashMap<String, Object>() {{
  HashMap<String, TextFragment[]> frag = queryContext.getFragments();
  frag.entrySet().stream().forEach(f -> {
   TextFragment[] fragments = f.getValue();
   StringBuilder hlField = new StringBuilder();
   for (int j = 0; j < fragments.length; j++) {
    if ((fragments[j] != null) && (fragments[j].getScore() > 0)) {
     hlField.append(fragments[j].toString());
    }
   }
   put("$" + f.getKey() + "_hl", hlField.toString());
  });
  put("$score", score.score);
 }});
}
origin: com.orientechnologies/orientdb-lucene

@Override
public void onRecordAddedToResultSet(OLuceneQueryContext queryContext, OContextualRecordId recordId, Document doc,
  ScoreDoc score) {
 OSpatialQueryContext spatialContext = (OSpatialQueryContext) queryContext;
 if (spatialContext.spatialArgs != null) {
  Point docPoint = (Point) ctx.readShape(doc.get(strategy.getFieldName()));
  double docDistDEG = ctx.getDistCalc().distance(spatialContext.spatialArgs.getShape().getCenter(), docPoint);
  final double docDistInKM = DistanceUtils.degrees2Dist(docDistDEG, DistanceUtils.EARTH_EQUATORIAL_RADIUS_KM);
  recordId.setContext(new HashMap<String, Object>() {
   {
    put("distance", docDistInKM);
   }
  });
 }
}
origin: orientechnologies/orientdb-lucene

@Override
public void onRecordAddedToResultSet(QueryContext queryContext, OContextualRecordId recordId, Document doc, ScoreDoc score) {
 SpatialQueryContext spatialContext = (SpatialQueryContext) queryContext;
 if (spatialContext.spatialArgs != null) {
  Point docPoint = (Point) ctx.readShape(doc.get(strategy.getFieldName()));
  double docDistDEG = ctx.getDistCalc().distance(spatialContext.spatialArgs.getShape().getCenter(), docPoint);
  final double docDistInKM = DistanceUtils.degrees2Dist(docDistDEG, DistanceUtils.EARTH_EQUATORIAL_RADIUS_KM);
  recordId.setContext(new HashMap<String, Object>() {
   {
    put("distance", docDistInKM);
   }
  });
 }
}
origin: com.orientechnologies/orientdb-lucene

@Override
public void onRecordAddedToResultSet(OLuceneQueryContext queryContext, OContextualRecordId recordId, Document doc,
  ScoreDoc score) {
 OSpatialQueryContext spatialContext = (OSpatialQueryContext) queryContext;
 if (spatialContext.spatialArgs != null) {
  updateLastAccess();
  openIfClosed();
  Point docPoint = (Point) ctx.readShape(doc.get(strategy.getFieldName()));
  double docDistDEG = ctx.getDistCalc().distance(spatialContext.spatialArgs.getShape().getCenter(), docPoint);
  final double docDistInKM = DistanceUtils.degrees2Dist(docDistDEG, DistanceUtils.EARTH_EQUATORIAL_RADIUS_KM);
  recordId.setContext(new HashMap<String, Object>() {
   {
    put("distance", docDistInKM);
   }
  });
 }
}
com.orientechnologies.orient.core.idOContextualRecordIdsetContext

Popular methods of OContextualRecordId

  • <init>
  • getContext

Popular in Java

  • Reading from database using SQL prepared statement
  • setContentView (Activity)
  • addToBackStack (FragmentTransaction)
  • startActivity (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Path (java.nio.file)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now