Ignore:
Timestamp:
2020-02-12T21:27:02+13:00 (4 years ago)
Author:
ak19
Message:
  1. Adjusted table mongodb query statements to be more exact, but same results. 2. Adjusted code to not treat Australia specially, as the AU site with mi in URL path has now shifted to US. 3. Differences in geoLocation results from previous mongoDB ingest to present one documented for cases not dealing with mi in URL path of overseas domains. 4.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/maori-lang-detection/src/org/greenstone/atea/MongoDBQueryer.java

    r33912 r33913  
    359359    // https://stackoverflow.com/questions/28790784/java-8-preferred-way-to-count-iterations-of-a-lambda
    360360    Holder<Integer> docNum = new Holder<>(1);
    361    
     361
     362    /*
    362363    Bson orQuery = or(
    363364              BasicDBObject.parse("{geoLocationCountryCode: \"AU\"}"),
     
    365366              // e.g. "{urlContainsLangCodeInPath: false}"
    366367              );
     368    */
    367369    Bson andQuery = and(
    368         BasicDBObject.parse("{geoLocationCountryCode: {$ne: \"NZ\"}}"),
    369         BasicDBObject.parse("{domain: {$not: /\\.nz$/}}"),
    370         BasicDBObject.parse(mriFilterString),
    371         orQuery);
     370        BasicDBObject.parse(mriFilterString),
     371        BasicDBObject.parse("{geoLocationCountryCode: {$ne: \"NZ\"}}"),
     372        BasicDBObject.parse("{domain: {$not: /\\.nz$/}}"),     
     373        BasicDBObject.parse("{urlContainsLangCodeInPath: "+ isMiInURLPath +"}"));//orQuery);
    372374
    373375    collection.aggregate(Arrays.asList(
     
    652654        orQuery = or(
    653655              BasicDBObject.parse("{geoLocationCountryCode: /(NZ|AU)/}"),
     656             //BasicDBObject.parse("{geoLocationCountryCode: \"NZ\"}"),
    654657              BasicDBObject.parse("{domain: /\\.nz$/}"),
    655658              BasicDBObject.parse("{urlContainsLangCodeInPath: false}")
Note: See TracChangeset for help on using the changeset viewer.